diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs index c1a26ab1a8329f662790326869a28cd11d277507..74565b3f4fadbcf9d221bf6f82ab9b32116d3275 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs @@ -256,7 +256,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl IResponse retVal; var count = 0; var loop = false; - SetPowershiftLossEnergy(absTime, dt, outTorque, outAngularVelocity); + SetPowershiftLossEnergy(absTime, dt, outTorque, outAngularVelocity, dryRun); do { if (CurrentState.Disengaged || (DataBus.DriverInfo.DriverBehavior == DrivingBehavior.Halted) @@ -294,11 +294,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return retVal; } - private void SetPowershiftLossEnergy(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity) + private void SetPowershiftLossEnergy(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, bool dryRun) { if (RequestAfterGearshift /*&& Gear != PreviousState.Gear*/) { LastShift = absTime; - Gear = _strategy?.Engage(absTime, dt, outTorque, outAngularVelocity) ?? Gear; + if (!dryRun) { + Gear = _strategy?.Engage(absTime, dt, outTorque, outAngularVelocity) ?? Gear; + } _powershiftLossEnergy = ComputeShiftLosses(outTorque, outAngularVelocity, Gear); } else { if (PreviousState.PowershiftLossEnergy != null && PreviousState.PowershiftLossEnergy.IsGreater(0)) {