Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit f10a1b22 authored by Harald Martini's avatar Harald Martini
Browse files

override axlegear required in IEPC_E rundata factory

parent f0b92c3b
No related branches found
No related tags found
No related merge requests found
......@@ -1008,8 +1008,40 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun
throw new NotImplementedException();
}
#endregion
}
#endregion
protected override bool AxleGearRequired()
{
var vehicle = PrimaryVehicle;
var iepcInput = vehicle.Components.IEPC;
var axleGearRequired = !iepcInput.DifferentialIncluded && !iepcInput.DesignTypeWheelMotor;
if (axleGearRequired && vehicle.Components.AxleGearInputData == null)
{
throw new VectoException(
$"Axlegear required for selected type of IEPC! DifferentialIncluded: {iepcInput.DifferentialIncluded}, DesignTypeWheelMotor: {iepcInput.DesignTypeWheelMotor}");
}
//var numGearsPowermap =
// iepcInput.VoltageLevels.Select(x => Tuple.Create(x.VoltageLevel, x.PowerMap.Count)).ToArray();
//var gearCount = iepcInput.Gears.Count;
//var numGearsDrag = iepcInput.DragCurves.Count;
//if (numGearsPowermap.Any(x => x.Item2 != gearCount))
//{
// throw new VectoException(
// $"Number of gears for voltage levels does not match! PowerMaps: {numGearsPowermap.Select(x => $"{x.Item1}: {x.Item2}").Join()}; Gear count: {gearCount}");
//}
//if (numGearsDrag > 1 && numGearsDrag != gearCount)
//{
// throw new VectoException(
// $"Number of gears drag curve does not match gear count! DragCurve {numGearsDrag}; Gear count: {gearCount}");
//}
return axleGearRequired || vehicle.Components.AxleGearInputData != null;
}
}
#endregion BatteryElectric
public class Exempted : CompletedBusBase
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment