diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs index 2949a0d18f3dd0ce37a0729209ea06b44ea812be..6dc54150222a701e57c4b8b32f1e93714aa045de 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs @@ -510,7 +510,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies return null; } - if (DataBus.VehicleInfo.VehicleSpeed.IsSmallerOrEqual(ModelData.GearboxData.DisengageWhenHaltingSpeed) && emOutTorque.IsSmaller(0)) { + if (ModelData.GearboxData != null && DataBus.VehicleInfo.VehicleSpeed.IsSmallerOrEqual(ModelData.GearboxData.DisengageWhenHaltingSpeed) && emOutTorque.IsSmaller(0)) { return null; } @@ -572,7 +572,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies GenSetOperatingPoint maxPowerGenset, Second dt) { var reqBatteryPower = maxPowerGenset.ElectricPower + drivetrainDemand.ElectricPowerDemand; - if (DataBus.BatteryInfo.StateOfCharge.IsEqual(StrategyParameters.MinSoC, 0.01) && reqBatteryPower < 0 && drivetrainDemand.ElectricPowerDemand < drivetrainDemand.Response.ElectricSystem.MaxPowerDrive) { + if (DataBus.BatteryInfo.StateOfCharge.IsEqual(StrategyParameters.MinSoC, 0.01) && reqBatteryPower < 0 && + drivetrainDemand.ElectricPowerDemand < drivetrainDemand.Response.ElectricSystem.MaxPowerDrive) { return StateMachineState.Acc_S3; }