From 5dc2d32345d354cdf1642a0e2f32a26b544fa16e Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Fri, 16 Oct 2015 13:36:09 +0200
Subject: [PATCH] new testcase: slope change before speed change (stop) -
 vehicle must not stop too early!

---
 .../DriverStrategy/DriverStrategyTestTruck.cs | 29 ++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/VectoCoreTest/Integration/DriverStrategy/DriverStrategyTestTruck.cs b/VectoCoreTest/Integration/DriverStrategy/DriverStrategyTestTruck.cs
index 5b27937336..7d68a0ba79 100644
--- a/VectoCoreTest/Integration/DriverStrategy/DriverStrategyTestTruck.cs
+++ b/VectoCoreTest/Integration/DriverStrategy/DriverStrategyTestTruck.cs
@@ -10,7 +10,7 @@ namespace TUGraz.VectoCore.Tests.Integration.DriverStrategy
 		[TestInitialize]
 		public void DisableLogging()
 		{
-			LogManager.DisableLogging();
+			//LogManager.DisableLogging();
 			//GraphWriter.Disable();
 		}
 
@@ -830,6 +830,33 @@ namespace TUGraz.VectoCore.Tests.Integration.DriverStrategy
 				.Run();
 		}
 
+		[TestMethod]
+		public void Truck_SlopeChangeBeforeStop()
+		{
+			var cycleData = new string[] {
+				// <s>,<v>,<grad>,<stop>
+				"  0,  60, -1.4,     0",
+				"198,  60, -1.7,     0",
+				"200,   0, -1.7,     4",
+			};
+			var cycle = SimpleDrivingCycles.CreateCycleData(cycleData);
+
+			Truck40tPowerTrain.CreateEngineeringRun(cycle, "Truck_DriverStrategy_SlopeChangeBeforeStop.vmod")
+				.Run();
+		}
+
+		[TestMethod]
+		public void Truck_FrequentSlopeChanges()
+		{
+			var cycleData = new string[] {
+				// <s>,<v>,<grad>,<stop>
+				"  0,  60,  0,     0",
+				" 10,  60, -6,     0",
+				"100,  55, -6,     0",
+				"300,  55, -6,     0"
+			};
+		}
+
 		#endregion
 	}
 }
\ No newline at end of file
-- 
GitLab