From 2a9971c69ed1929dc318307dee45ddbd0ca596e2 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Mon, 19 Oct 2015 18:02:34 +0200
Subject: [PATCH] bugfix  distance-based driving cycle: stopping-time has been
 ignored after refactoring

---
 .../SimulationComponent/Impl/DistanceBasedDrivingCycle.cs      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs b/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs
index 0aa2dc841f..fcac7469e9 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();
-- 
GitLab