From 79ced18e381db7a63cb1a1c447b8f76019ce0c35 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Fri, 9 Aug 2019 13:01:44 +0200
Subject: [PATCH] renaming property engine stop/start activation delay,
 separate reader and class for ESS driver data

---
 VECTO/GUI/VectoJobForm.vb                     |  2 +-
 VECTO/Input Files/VectoJob.vb                 |  2 +-
 VECTO/OutputData/JSONFileWriter.vb            |  2 +-
 .../InputData/EngineeringInputData.cs         |  2 +-
 .../Resources/XMLNames.Designer.cs            |  9 +++
 .../VectoCommon/Resources/XMLNames.resx       |  3 +
 .../InputData/FileIO/JSON/JSONInputData.cs    |  4 +-
 .../XMLEngineeringDriverDataProvider.cs       | 66 +++++++++++++++++--
 .../IEngineeringReaderInjectFactory.cs        |  2 +
 .../XMLEngineeringReaderV10InjectModule.cs    |  3 +
 .../Reader/IXMLDriverDataReader.cs            | 11 ++++
 .../Reader/Impl/XMLDriverDataReader.cs        | 11 +++-
 .../DeclarationDataAdapter.cs                 |  2 +-
 .../EngineeringDataAdapter.cs                 |  4 +-
 .../Models/Declaration/DeclarationData.cs     |  2 +-
 .../SimulationComponent/Data/DriverData.cs    |  2 +-
 .../Impl/DefaultDriverStrategy.cs             |  2 +-
 .../Simulation/MeasuredSpeedModeTest.cs       |  4 +-
 .../Models/Simulation/PwheelModeTests.cs      |  2 +-
 .../engineering_job-sample_ref_DF_WHR.xml     |  5 ++
 20 files changed, 117 insertions(+), 23 deletions(-)

diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb
index 1f5db220d3..b749d35b6c 100644
--- a/VECTO/GUI/VectoJobForm.vb
+++ b/VECTO/GUI/VectoJobForm.vb
@@ -536,7 +536,7 @@ Public Class VectoJobForm
 											GetRelativePath(driver.Lookahead.CoastingDecisionFactorVelocityDropLookup.Source, _basePath))
 		End If
 
-		tbEngineStopStartThreshold.Text =  If(driver.EngineOffStandStillThreshold?.ToGUIFormat(), DeclarationData.Driver.MaxEngineOffTimespan.ToGUIFormat())
+		tbEngineStopStartThreshold.Text =  If(driver.EngineOffStandStillActivationDelay?.ToGUIFormat(), DeclarationData.Driver.MaxEngineOffTimespan.ToGUIFormat())
         tbEngineOffThreshold.Text = If(driver.MaxEngineOffTimespan?.ToGUIFormat(), DeclarationData.Driver.MaxEngineOffTimespan.ToGUIFormat())
         tbEssUtility.Text = driver.EngineStopStartUtilityFactor.ToGUIFormat()
 
diff --git a/VECTO/Input Files/VectoJob.vb b/VECTO/Input Files/VectoJob.vb
index 1e3f4043bb..4c51fc4a3e 100644
--- a/VECTO/Input Files/VectoJob.vb	
+++ b/VECTO/Input Files/VectoJob.vb	
@@ -279,7 +279,7 @@ Public Class VectoJob
         End Get
     End Property
 
-    Public ReadOnly Property EngineOffStandStillThreshold As Second Implements IDriverEngineeringInputData.EngineOffStandStillThreshold
+    Public ReadOnly Property EngineOffStandStillActivationDelay As Second Implements IDriverEngineeringInputData.EngineOffStandStillActivationDelay
         Get
             return EngineStopStartThreshold.SI(Of Second)()
         End Get
diff --git a/VECTO/OutputData/JSONFileWriter.vb b/VECTO/OutputData/JSONFileWriter.vb
index 86e7923bbe..a9ce75d281 100644
--- a/VECTO/OutputData/JSONFileWriter.vb
+++ b/VECTO/OutputData/JSONFileWriter.vb
@@ -341,7 +341,7 @@ Public Class JSONFileWriter
 		
 		If Not job.SavedInDeclarationMode Then
 			body.Add("VACC", GetRelativePath(driver.AccelerationCurve.AccelerationCurve.Source, basePath))
-		    body.Add("EngineStopStartAtVehicleStopThreshold", driver.EngineOffStandStillThreshold.Value())
+		    body.Add("EngineStopStartAtVehicleStopThreshold", driver.EngineOffStandStillActivationDelay.Value())
             body.Add("EngineStopStartMaxOffTimespan", driver.MaxEngineOffTimespan.Value())
             body.Add("EngineStopStartUtilityFactor", driver.EngineStopStartUtilityFactor)
 		End If
diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs
index 7886258c6e..6bd1d11618 100644
--- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs
+++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs
@@ -349,7 +349,7 @@ namespace TUGraz.VectoCommon.InputData
 		ILookaheadCoastingInputData Lookahead { get; }
 
 		IGearshiftEngineeringInputData GearshiftInputData { get; }
-		Second EngineOffStandStillThreshold { get; }
+		Second EngineOffStandStillActivationDelay { get; }
 		Second MaxEngineOffTimespan { get; }
 		double EngineStopStartUtilityFactor { get; }
 	}
diff --git a/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs b/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs
index e26ec9f51d..6a2a457cd1 100644
--- a/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs
+++ b/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs
@@ -735,6 +735,15 @@ namespace TUGraz.VectoCommon.Resources {
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to EngineStopStartParameters.
+        /// </summary>
+        public static string DriverModel_EngineStopStartParameters {
+            get {
+                return ResourceManager.GetString("DriverModel_EngineStopStartParameters", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   Looks up a localized string similar to LookAheadCoasting.
         /// </summary>
diff --git a/VectoCommon/VectoCommon/Resources/XMLNames.resx b/VectoCommon/VectoCommon/Resources/XMLNames.resx
index 92ad4c3dd4..e5a96c7206 100644
--- a/VectoCommon/VectoCommon/Resources/XMLNames.resx
+++ b/VectoCommon/VectoCommon/Resources/XMLNames.resx
@@ -1116,4 +1116,7 @@
   <data name="Engine_WHRMap" xml:space="preserve">
     <value>WHRMap</value>
   </data>
+  <data name="DriverModel_EngineStopStartParameters" xml:space="preserve">
+    <value>EngineStopStartParameters</value>
+  </data>
 </root>
\ No newline at end of file
diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
index c239383d7e..0eb0504d18 100644
--- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
@@ -508,7 +508,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			}
 		}
 
-		public virtual Second EngineOffStandStillThreshold
+		public virtual Second EngineOffStandStillActivationDelay
 		{
 			get { return null; }
 		}
@@ -841,7 +841,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 	{
 		public JSONInputDataV5(JObject data, string filename, bool tolerateMissing = false) : base(data, filename, tolerateMissing) { }
 
-		public override Second EngineOffStandStillThreshold
+		public override Second EngineOffStandStillActivationDelay
 		{
 			get {
 				return Body["EngineStopStartAtVehicleStopThreshold"] == null
diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringDriverDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringDriverDataProvider.cs
index a7d098af19..48e47e9a13 100644
--- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringDriverDataProvider.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringDriverDataProvider.cs
@@ -2,6 +2,7 @@ using System.Xml;
 using System.Xml.Linq;
 using TUGraz.VectoCommon.InputData;
 using TUGraz.VectoCommon.Utils;
+using TUGraz.VectoCore.InputData.FileIO.XML.Common;
 using TUGraz.VectoCore.InputData.FileIO.XML.Engineering.Interfaces;
 using TUGraz.VectoCore.Models.Declaration;
 using TUGraz.VectoCore.Utils;
@@ -26,7 +27,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
 			XmlNode driverDataNode, string fsBasePath)
 			: base(driverDataNode, fsBasePath)
 		{
-			SourceType = (inputData as IXMLResource).DataSource.SourceFile == fsBasePath ? DataSourceType.XMLEmbedded : DataSourceType.XMLFile;
+			SourceType = (inputData as IXMLResource).DataSource.SourceFile == fsBasePath
+				? DataSourceType.XMLEmbedded
+				: DataSourceType.XMLFile;
 		}
 
 		public IXMLDriverDataReader Reader { protected get; set; }
@@ -46,7 +49,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
 			get { return _shiftParameters ?? (_shiftParameters = Reader.ShiftParameters); }
 		}
 
-		public virtual Second EngineOffStandStillThreshold
+		public virtual Second EngineOffStandStillActivationDelay
 		{
 			get { return null; }
 		}
@@ -68,7 +71,10 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
 
 		#region Overrides of AbstractXMLResource
 
-		protected override XNamespace SchemaNamespace { get { return NAMESPACE_URI; } }
+		protected override XNamespace SchemaNamespace
+		{
+			get { return NAMESPACE_URI; }
+		}
 
 		protected override DataSourceType SourceType { get; }
 
@@ -83,25 +89,71 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
 
 		public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, XSD_TYPE);
 
+		protected IXMLEngineStopStartDriverData _engineStopStart;
+
 		public XMLEngineeringDriverDataProviderV10(
 			IXMLEngineeringInputData inputData, XmlNode driverDataNode, string fsBasePath) : base(
 			inputData, driverDataNode, fsBasePath) { }
 
 		#region Overrides of XMLEngineeringDriverDataProviderV07
 
-		protected override XNamespace SchemaNamespace { get { return NAMESPACE_URI; } }
+		protected override XNamespace SchemaNamespace
+		{
+			get { return NAMESPACE_URI; }
+		}
 
-		public override Second EngineOffStandStillThreshold
+		public override Second EngineOffStandStillActivationDelay
 		{
-			get { return GetDouble("EngineStopStartThreshold", DeclarationData.Driver.EngineOffStandStillThreshold.Value()).SI<Second>(); }
+			get {
+				return (_engineStopStart ?? (_engineStopStart = Reader.EngineStopStartData))?.EngineOffStandStillActivationDelay;
+			}
 		}
 
 		public override Second MaxEngineOffTimespan
 		{
-			get { return GetDouble("MaxEngineStopStartTimespan", DeclarationData.Driver.EngineOffStandStillThreshold.Value()).SI<Second>(); }
+			get { return (_engineStopStart ?? (_engineStopStart = Reader.EngineStopStartData))?.MaxEngineOffTimespan; }
 		}
 
 		public override double EngineStopStartUtilityFactor
+		{
+			get {
+				return (_engineStopStart ?? (_engineStopStart = Reader.EngineStopStartData))?.EngineStopStartUtilityFactor ??
+						DeclarationData.Driver.EngineStopStartUtilityFactor;
+			}
+		}
+
+		#endregion
+	}
+
+	internal class XMLEngineStopStartDriverDataV10 : AbstractXMLType, IXMLEngineStopStartDriverData
+	{
+		public static readonly XNamespace NAMESPACE_URI = XMLDefinitions.ENGINEERING_DEFINITONS_NAMESPACE_V10;
+
+		public const string XSD_TYPE = "EngineStartStopParametersEngineeringType";
+
+		public static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, XSD_TYPE);
+
+		public XMLEngineStopStartDriverDataV10(IXMLEngineeringDriverData driverData, XmlNode node) : base(node) { }
+
+		#region Implementation of IXMLEngineStopStartDriverData
+
+		public Second EngineOffStandStillActivationDelay
+		{
+			get {
+				return GetDouble("ActivationDelay", DeclarationData.Driver.EngineOffStandStillActivationDelay.Value()).SI<Second>();
+			}
+		}
+
+		public Second MaxEngineOffTimespan
+		{
+			get {
+				return GetDouble(
+					"MaxEngineStopStartTimespan",
+					DeclarationData.Driver.EngineOffStandStillActivationDelay.Value()).SI<Second>();
+			}
+		}
+
+		public double EngineStopStartUtilityFactor
 		{
 			get {
 				return ElementExists("EngineStopStartUtilityFactor")
diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Factory/IEngineeringReaderInjectFactory.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Factory/IEngineeringReaderInjectFactory.cs
index feb18caf6e..dcf02ae60e 100644
--- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Factory/IEngineeringReaderInjectFactory.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Factory/IEngineeringReaderInjectFactory.cs
@@ -76,5 +76,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.Factory
 		IXMLAuxiliaryReader CreatAuxiliariesReader(string version, IXMLEngineeringVehicleData vehicle, XmlNode componentsNode);
 		IXMLAxlesReader CreateAxlesReader(string version, IXMLEngineeringVehicleData vehicle, XmlNode componentsNode);
 		IXMLGearboxReader CreateGearboxReader(string version, IXMLEngineeringVehicleData vehicle, XmlNode componentsNode);
+
+		IXMLEngineStopStartDriverData CreateEngineStopStartData(string version, IXMLEngineeringDriverData driverData, XmlNode node);
 	}
 }
diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/NinjectModules/XMLEngineeringReaderV10InjectModule.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/NinjectModules/XMLEngineeringReaderV10InjectModule.cs
index 65c6ec958d..63af1a0ae5 100644
--- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/NinjectModules/XMLEngineeringReaderV10InjectModule.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/NinjectModules/XMLEngineeringReaderV10InjectModule.cs
@@ -89,6 +89,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.NinjectModules
 
 			Bind<IXMLDriverAcceleration>().To<XMLDriverAccelerationV10>()
 										.Named(XMLDriverAccelerationV10.QUALIFIED_XSD_TYPE);
+
+			Bind<IXMLEngineStopStartDriverData>().To<XMLEngineStopStartDriverDataV10>()
+												.Named(XMLEngineStopStartDriverDataV10.QUALIFIED_XSD_TYPE);
 		}
 
 		#endregion
diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Reader/IXMLDriverDataReader.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Reader/IXMLDriverDataReader.cs
index b896ec0eba..401e27dfbf 100644
--- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Reader/IXMLDriverDataReader.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Reader/IXMLDriverDataReader.cs
@@ -1,4 +1,5 @@
 using TUGraz.VectoCommon.InputData;
+using TUGraz.VectoCommon.Utils;
 using TUGraz.VectoCore.InputData.FileIO.XML.Engineering.Interfaces;
 
 namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering
@@ -12,5 +13,15 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering
 		IXMLDriverAcceleration AccelerationCurveData { get; }
 
 		IGearshiftEngineeringInputData ShiftParameters { get; }
+		IXMLEngineStopStartDriverData EngineStopStartData { get; }
+	}
+
+	public interface IXMLEngineStopStartDriverData
+	{
+		Second EngineOffStandStillActivationDelay { get; }
+
+		Second MaxEngineOffTimespan { get; }
+
+		double EngineStopStartUtilityFactor { get; }
 	}
 }
\ No newline at end of file
diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Reader/Impl/XMLDriverDataReader.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Reader/Impl/XMLDriverDataReader.cs
index 6ca71e9935..d340a3a59f 100644
--- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Reader/Impl/XMLDriverDataReader.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/Reader/Impl/XMLDriverDataReader.cs
@@ -67,6 +67,15 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.Reader {
 			}
 		}
 
+		public IXMLEngineStopStartDriverData EngineStopStartData
+		{
+			get {
+				return CreateData(
+					XMLNames.DriverModel_EngineStopStartParameters, 
+					(version, node) => version == null ? null : Factory.CreateEngineStopStartData(version, DriverData, node), false);
+			}
+		}
+
 		private IGearshiftEngineeringInputData ShiftParametersCreator(string version, XmlNode node)
 		{
 			if (version == null) {
@@ -123,7 +132,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.Reader {
 	{
 		public new const string NAMESPACE_URI = XMLDefinitions.ENGINEERING_DEFINITONS_NAMESPACE_V10;
 
-		public new const string XSD_TYPE = "DriverModelType";
+		public new const string XSD_TYPE = "DriverModelEngineeringType";
 
 		public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI, XSD_TYPE);
 
diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs
index f9080d329b..364c20c4fd 100644
--- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs
+++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs
@@ -79,7 +79,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
 				LookAheadCoasting = lookAheadData,
 				OverSpeedEcoRoll = overspeedData,
 				EngineStopStart = new DriverData.EngineStopStartData() {
-					EngineOffStandStillThreshold = DeclarationData.Driver.EngineOffStandStillThreshold,
+					EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineOffStandStillActivationDelay,
 					MaxEngineOffTimespan = DeclarationData.Driver.MaxEngineOffTimespan,
 					UtilityFactor = DeclarationData.Driver.EngineStopStartUtilityFactor,
 				},
diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs
index 2efaddd967..d0fd5de595 100644
--- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs
+++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs
@@ -458,8 +458,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
 				LookAheadCoasting = lookAheadData,
 				OverSpeedEcoRoll = overspeedData,
 				EngineStopStart = new DriverData.EngineStopStartData() {
-					EngineOffStandStillThreshold =
-						driver.EngineOffStandStillThreshold ?? DeclarationData.Driver.EngineOffStandStillThreshold,
+					EngineOffStandStillActivationDelay =
+						driver.EngineOffStandStillActivationDelay ?? DeclarationData.Driver.EngineOffStandStillActivationDelay,
 					MaxEngineOffTimespan = driver.MaxEngineOffTimespan ?? DeclarationData.Driver.MaxEngineOffTimespan,
 					UtilityFactor = driver.EngineStopStartUtilityFactor,
 				}
diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
index dd93500ad4..bb3bd9e74e 100644
--- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
+++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
@@ -117,7 +117,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 
 		public static class Driver
 		{
-			public static readonly Second EngineOffStandStillThreshold = 2.SI<Second>();
+			public static readonly Second EngineOffStandStillActivationDelay = 2.SI<Second>();
 			public static readonly Second MaxEngineOffTimespan = 120.SI<Second>();
 			public const double EngineStopStartUtilityFactor = 0.8;
 
diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/DriverData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/DriverData.cs
index d3311f369b..dce9f9f9a6 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Data/DriverData.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/DriverData.cs
@@ -79,7 +79,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
 
 		public class EngineStopStartData
 		{
-			[Required, SIRange(0, Double.MaxValue)] public Second EngineOffStandStillThreshold;
+			[Required, SIRange(0, Double.MaxValue)] public Second EngineOffStandStillActivationDelay;
 
 			[Required, SIRange(0, double.MaxValue)] public Second MaxEngineOffTimespan;
 
diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs
index b1fb6a2334..71d38f7a8a 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs
@@ -158,7 +158,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 			}
 
 			if ((absTime - VehicleHaltTimestamp).IsGreaterOrEqual(
-				Driver.DriverData.EngineStopStart.EngineOffStandStillThreshold)) {
+				Driver.DriverData.EngineStopStart.EngineOffStandStillActivationDelay)) {
 				if (EngineOffTimestamp == null) {
 					EngineOffTimestamp = absTime;
 					Driver.DataBus.IgnitionOn = false;
diff --git a/VectoCore/VectoCoreTest/Models/Simulation/MeasuredSpeedModeTest.cs b/VectoCore/VectoCoreTest/Models/Simulation/MeasuredSpeedModeTest.cs
index 8c58a0af86..8149ad4a6c 100644
--- a/VectoCore/VectoCoreTest/Models/Simulation/MeasuredSpeedModeTest.cs
+++ b/VectoCore/VectoCoreTest/Models/Simulation/MeasuredSpeedModeTest.cs
@@ -266,7 +266,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
 				DriverData = new DriverData() {
 					EngineStopStart = new DriverData.EngineStopStartData() {
 						UtilityFactor = DeclarationData.Driver.EngineStopStartUtilityFactor,
-						EngineOffStandStillThreshold = DeclarationData.Driver.EngineOffStandStillThreshold,
+						EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineOffStandStillActivationDelay,
 						MaxEngineOffTimespan =  DeclarationData.Driver.MaxEngineOffTimespan
 					}
 				}
@@ -348,7 +348,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
 				Retarder = new RetarderData(),
 				DriverData = new DriverData() {
 					EngineStopStart = new DriverData.EngineStopStartData() {
-						EngineOffStandStillThreshold = DeclarationData.Driver.EngineOffStandStillThreshold,
+						EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineOffStandStillActivationDelay,
 						UtilityFactor = DeclarationData.Driver.EngineStopStartUtilityFactor,
 						MaxEngineOffTimespan = DeclarationData.Driver.MaxEngineOffTimespan,
 					}
diff --git a/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs b/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs
index 371f44ac54..1661bf4504 100644
--- a/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs
+++ b/VectoCore/VectoCoreTest/Models/Simulation/PwheelModeTests.cs
@@ -170,7 +170,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
 				DriverData = new DriverData() {
 					EngineStopStart = new DriverData.EngineStopStartData() {
 						UtilityFactor = DeclarationData.Driver.EngineStopStartUtilityFactor,
-						EngineOffStandStillThreshold = DeclarationData.Driver.EngineOffStandStillThreshold,
+						EngineOffStandStillActivationDelay = DeclarationData.Driver.EngineOffStandStillActivationDelay,
 						MaxEngineOffTimespan = DeclarationData.Driver.MaxEngineOffTimespan
 					}
 				}
diff --git a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_job-sample_ref_DF_WHR.xml b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_job-sample_ref_DF_WHR.xml
index 400931aede..b8ec95ead2 100644
--- a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_job-sample_ref_DF_WHR.xml
+++ b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderEngineering/engineering_job-sample_ref_DF_WHR.xml
@@ -33,6 +33,11 @@
 			<Entry vehicleSpeed="0" maxAcceleration="1" maxDeceleration="-1"/>
 			<Entry vehicleSpeed="100" maxAcceleration="1" maxDeceleration="-1"/>
 		</DriverAccelerationCurve>
+		<!--<EngineStopStartParameters xsi:type="EngineStartStopParametersEngineeringType">
+			<ActivationDelay>2</ActivationDelay>
+			<MaxEngineOffTime>120</MaxEngineOffTime>
+			<UtilityFactor>0.8</UtilityFactor>
+		</EngineStopStartParameters>-->
 	</DriverModel>
 	<MissionCycles>
 		<Cycle type="csv" file="Long_Haul+FAN+ES.vdri"/>
-- 
GitLab