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

Skip to content
Snippets Groups Projects
Commit f10d0e3a authored by Michael KRISPER's avatar Michael KRISPER
Browse files

Improved check for APT-N Gearbox when used in SimplePowertrain

parent b89082ae
No related branches found
No related tags found
No related merge requests found
......@@ -1040,16 +1040,17 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
return new ATShiftStrategyOptimized(container);
//return new ATShiftStrategy(runData, container);
case GearboxType.APTN:
if (container.IsTestPowertrain
|| runData.JobType == VectoSimulationJobType.ParallelHybridVehicle
|| runData.JobType == VectoSimulationJobType.SerialHybridVehicle
|| runData.JobType == VectoSimulationJobType.BatteryElectricVehicle
) {
switch (runData.JobType) {
case VectoSimulationJobType.ParallelHybridVehicle:
case VectoSimulationJobType.SerialHybridVehicle:
case VectoSimulationJobType.BatteryElectricVehicle:
runData.ShiftStrategy = APTNShiftStrategy.Name;
return new APTNShiftStrategy(container);
}
case VectoSimulationJobType.ConventionalVehicle when container.IsTestPowertrain:
return null;
default:
throw new ArgumentException("APT-N Gearbox is only applicable on hybrids and battery electric vehicles.");
}
default:
throw new ArgumentOutOfRangeException("GearboxType",
$"Unknown Gearbox Type {runData.GearboxData.Type}");
......
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