diff --git a/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs b/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs index 0aa2dc841f2c6a1d7068cdda2b090b925090b35e..fcac7469e96e71c1b43d8f0d4e2c342aec26966a 100644 --- a/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs +++ b/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs @@ -262,7 +262,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl // separately test for equality and greater than to have tolerance for equality comparison if (CycleIntervalIterator.LeftSample.StoppingTime.IsEqual(0)) { - while (CurrentState.Distance.IsGreaterOrEqual(CycleIntervalIterator.RightSample.Distance) && + while (CycleIntervalIterator.LeftSample.StoppingTime.IsEqual(0) && + CurrentState.Distance.IsGreaterOrEqual(CycleIntervalIterator.RightSample.Distance) && !CycleIntervalIterator.LastEntry) { // we have reached the end of the current interval in the cycle, move on... CycleIntervalIterator.MoveNext();