Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 8f65c021 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

bugfix loading gearbox file for battery electric vehicles

bugfix: PCC for IHPC and IEPC
parent d7e9c906
Branches
Tags
No related merge requests found
...@@ -484,7 +484,7 @@ Public Class VectoJobForm ...@@ -484,7 +484,7 @@ Public Class VectoJobForm
Else Else
TbENG.Text = "" TbENG.Text = ""
End If End If
If (JobType <> VectoSimulationJobType.BatteryElectricVehicle AndAlso inputData.JobInputData.Vehicle.Components.GearboxInputData IsNot Nothing) Then If (JobType <> VectoSimulationJobType.BatteryElectricVehicle orelse inputData.JobInputData.Vehicle.Components.GearboxInputData IsNot Nothing) Then
TbGBX.Text = GetRelativePath(inputData.JobInputData.Vehicle.Components.GearboxInputData.DataSource.SourceFile, _basePath) TbGBX.Text = GetRelativePath(inputData.JobInputData.Vehicle.Components.GearboxInputData.DataSource.SourceFile, _basePath)
Else Else
TbGBX.Text = "" TbGBX.Text = ""
......
...@@ -125,7 +125,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl ...@@ -125,7 +125,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
var gradient = 0.SI<Radian>(); var gradient = 0.SI<Radian>();
foreach (var motor in container.ElectricMotors.Values) { foreach (var motor in container.ElectricMotors.Values) {
((motor as ElectricMotor).Control as DummyElectricMotorControl).EmTorque = null; if ((motor as ElectricMotor).Control is DummyElectricMotorControl emCtl) {
emCtl.EmTorque = null;
}
} }
var initialResponse = vehicle.Request(absTime, simulationInterval, acceleration, gradient); var initialResponse = vehicle.Request(absTime, simulationInterval, acceleration, gradient);
......
...@@ -114,11 +114,23 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -114,11 +114,23 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (ADAS.PredictiveCruiseControl != PredictiveCruiseControlType.None) { if (ADAS.PredictiveCruiseControl != PredictiveCruiseControlType.None) {
// create a dummy powertrain for pre-processing and estimations // create a dummy powertrain for pre-processing and estimations
var testContainer = new SimplePowertrainContainer(data); var testContainer = new SimplePowertrainContainer(data);
if (data.JobType != VectoSimulationJobType.BatteryElectricVehicle && data.JobType != VectoSimulationJobType.SerialHybridVehicle &&
data.JobType != VectoSimulationJobType.IEPC_E && data.JobType != VectoSimulationJobType.IEPC_S) switch (data.JobType) {
PowertrainBuilder.BuildSimplePowertrain(data, testContainer); case VectoSimulationJobType.BatteryElectricVehicle:
else { case VectoSimulationJobType.SerialHybridVehicle:
case VectoSimulationJobType.IEPC_E:
case VectoSimulationJobType.IEPC_S:
PowertrainBuilder.BuildSimplePowertrainElectric(data, testContainer); PowertrainBuilder.BuildSimplePowertrainElectric(data, testContainer);
break;
case VectoSimulationJobType.IHPC:
case VectoSimulationJobType.ParallelHybridVehicle:
PowertrainBuilder.BuildSimpleHybridPowertrain(data, testContainer);
break;
case VectoSimulationJobType.ConventionalVehicle:
PowertrainBuilder.BuildSimplePowertrain(data, testContainer);
break;
default:
throw new ArgumentOutOfRangeException(nameof(data.JobType));
} }
container.AddPreprocessor(new PCCSegmentPreprocessor(testContainer, PCCSegments, data?.DriverData.PCC)); container.AddPreprocessor(new PCCSegmentPreprocessor(testContainer, PCCSegments, data?.DriverData.PCC));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment