diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs index 45a94f3974dde6ba2a856a914bbebba32fff7565..41e0fb4be6976c8745d39aa031a137a0ed98bd66 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs @@ -179,11 +179,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl private Second GetStopTimeInterval() { if (!Left.PTOActive || IdleController == null) { - if ((Left.StoppingTime - CurrentState.WaitTime).IsGreater(2 * Constants.SimulationSettings.TargetTimeInterval, + if ((Left.StoppingTime - PreviousState.WaitTime).IsGreater(2 * Constants.SimulationSettings.TargetTimeInterval, 0.1 * Constants.SimulationSettings.TargetTimeInterval)) { return 2 * Constants.SimulationSettings.TargetTimeInterval; } - return Left.StoppingTime - CurrentState.WaitTime; + return Left.StoppingTime - PreviousState.WaitTime; } if (Left.StoppingTime.IsGreater(6 * Constants.SimulationSettings.TargetTimeInterval)) { // 7 phases @@ -538,4 +538,4 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl CycleIntervalIterator.Dispose(); } } -} \ No newline at end of file +}