From 7634c5055fb6a101a54ae2760734953c66b64570 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Wed, 2 May 2018 17:09:39 +0200
Subject: [PATCH] adding milege and NCV test fuel to GUI, compute correction
 factor

---
 VECTO/GUI/VectoVTPJobForm.Designer.vb         | 92 +++++++++++++++++--
 VECTO/GUI/VectoVTPJobForm.vb                  |  9 ++
 VECTO/Input Files/VectoEPTPJob.vb             |  3 +
 VECTO/OutputData/JSONFileWriter.vb            |  2 +
 .../InputData/VTPDeclarationInputData.cs      |  4 +
 .../Utils/SIConvertExtensionMethods.cs        |  7 +-
 VectoCommon/VectoCommon/Utils/SIUtils.cs      | 12 +++
 .../InputData/FileIO/JSON/JSONInputData.cs    | 10 ++
 .../DeclarationVTPModeVectoRunDataFactory.cs  | 38 +++++---
 .../Models/Declaration/DeclarationData.cs     |  3 +
 .../class_5_generic vehicle_DECL.vecto        |  4 +-
 11 files changed, 160 insertions(+), 24 deletions(-)

diff --git a/VECTO/GUI/VectoVTPJobForm.Designer.vb b/VECTO/GUI/VectoVTPJobForm.Designer.vb
index 968e1c2fc3..e48b774716 100644
--- a/VECTO/GUI/VectoVTPJobForm.Designer.vb
+++ b/VECTO/GUI/VectoVTPJobForm.Designer.vb
@@ -80,6 +80,12 @@ Partial Class VectoVTPJobForm
         Me.Label1 = New System.Windows.Forms.Label()
         Me.Label5 = New System.Windows.Forms.Label()
         Me.pnManufacturerRecord = New System.Windows.Forms.Panel()
+        Me.lblMileageUnit = New System.Windows.Forms.Label()
+        Me.tbMileage = New System.Windows.Forms.TextBox()
+        Me.lblMileage = New System.Windows.Forms.Label()
+        Me.lblNCVUnit = New System.Windows.Forms.Label()
+        Me.tbNCV = New System.Windows.Forms.TextBox()
+        Me.lblNCV = New System.Windows.Forms.Label()
         Me.Label8 = New System.Windows.Forms.Label()
         Me.tbManufacturerRecord = New System.Windows.Forms.TextBox()
         Me.ButtonManR = New System.Windows.Forms.Button()
@@ -104,7 +110,7 @@ Partial Class VectoVTPJobForm
         Me.GrCycles.Controls.Add(Me.LvCycles)
         Me.GrCycles.Controls.Add(Me.BtDRIrem)
         Me.GrCycles.Controls.Add(Me.BtDRIadd)
-        Me.GrCycles.Location = New System.Drawing.Point(12, 290)
+        Me.GrCycles.Location = New System.Drawing.Point(11, 324)
         Me.GrCycles.Name = "GrCycles"
         Me.GrCycles.Size = New System.Drawing.Size(515, 138)
         Me.GrCycles.TabIndex = 10
@@ -174,7 +180,7 @@ Partial Class VectoVTPJobForm
         Me.GrAux.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left)  _
             Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
         Me.GrAux.Controls.Add(Me.LvAux)
-        Me.GrAux.Location = New System.Drawing.Point(12, 144)
+        Me.GrAux.Location = New System.Drawing.Point(11, 178)
         Me.GrAux.Name = "GrAux"
         Me.GrAux.Size = New System.Drawing.Size(515, 140)
         Me.GrAux.TabIndex = 9
@@ -237,7 +243,7 @@ Partial Class VectoVTPJobForm
         'StatusStrip1
         '
         Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabelGEN})
-        Me.StatusStrip1.Location = New System.Drawing.Point(0, 584)
+        Me.StatusStrip1.Location = New System.Drawing.Point(0, 609)
         Me.StatusStrip1.Name = "StatusStrip1"
         Me.StatusStrip1.Size = New System.Drawing.Size(944, 22)
         Me.StatusStrip1.SizingGrip = false
@@ -253,7 +259,7 @@ Partial Class VectoVTPJobForm
         'ButOK
         '
         Me.ButOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
-        Me.ButOK.Location = New System.Drawing.Point(778, 557)
+        Me.ButOK.Location = New System.Drawing.Point(778, 582)
         Me.ButOK.Name = "ButOK"
         Me.ButOK.Size = New System.Drawing.Size(75, 23)
         Me.ButOK.TabIndex = 0
@@ -264,7 +270,7 @@ Partial Class VectoVTPJobForm
         '
         Me.ButCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
         Me.ButCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
-        Me.ButCancel.Location = New System.Drawing.Point(859, 557)
+        Me.ButCancel.Location = New System.Drawing.Point(859, 582)
         Me.ButCancel.Name = "ButCancel"
         Me.ButCancel.Size = New System.Drawing.Size(75, 23)
         Me.ButCancel.TabIndex = 1
@@ -481,7 +487,7 @@ Partial Class VectoVTPJobForm
         Me.GroupBox1.Controls.Add(Me.tbC1)
         Me.GroupBox1.Controls.Add(Me.Label1)
         Me.GroupBox1.Controls.Add(Me.PictureBox2)
-        Me.GroupBox1.Location = New System.Drawing.Point(11, 434)
+        Me.GroupBox1.Location = New System.Drawing.Point(10, 468)
         Me.GroupBox1.Name = "GroupBox1"
         Me.GroupBox1.Size = New System.Drawing.Size(515, 135)
         Me.GroupBox1.TabIndex = 39
@@ -572,22 +578,82 @@ Partial Class VectoVTPJobForm
         '
         'pnManufacturerRecord
         '
+        Me.pnManufacturerRecord.Controls.Add(Me.lblMileageUnit)
+        Me.pnManufacturerRecord.Controls.Add(Me.tbMileage)
+        Me.pnManufacturerRecord.Controls.Add(Me.lblMileage)
+        Me.pnManufacturerRecord.Controls.Add(Me.lblNCVUnit)
+        Me.pnManufacturerRecord.Controls.Add(Me.tbNCV)
+        Me.pnManufacturerRecord.Controls.Add(Me.lblNCV)
         Me.pnManufacturerRecord.Controls.Add(Me.Label8)
         Me.pnManufacturerRecord.Controls.Add(Me.tbManufacturerRecord)
         Me.pnManufacturerRecord.Controls.Add(Me.ButtonManR)
         Me.pnManufacturerRecord.Location = New System.Drawing.Point(11, 112)
         Me.pnManufacturerRecord.Name = "pnManufacturerRecord"
-        Me.pnManufacturerRecord.Size = New System.Drawing.Size(525, 36)
+        Me.pnManufacturerRecord.Size = New System.Drawing.Size(525, 66)
         Me.pnManufacturerRecord.TabIndex = 41
         '
+        'lblMileageUnit
+        '
+        Me.lblMileageUnit.AutoSize = true
+        Me.lblMileageUnit.Location = New System.Drawing.Point(476, 43)
+        Me.lblMileageUnit.Name = "lblMileageUnit"
+        Me.lblMileageUnit.Size = New System.Drawing.Size(27, 13)
+        Me.lblMileageUnit.TabIndex = 49
+        Me.lblMileageUnit.Text = "[km]"
+        '
+        'tbMileage
+        '
+        Me.tbMileage.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left)  _
+            Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
+        Me.tbMileage.Location = New System.Drawing.Point(394, 40)
+        Me.tbMileage.Name = "tbMileage"
+        Me.tbMileage.Size = New System.Drawing.Size(76, 20)
+        Me.tbMileage.TabIndex = 48
+        '
+        'lblMileage
+        '
+        Me.lblMileage.AutoSize = true
+        Me.lblMileage.Location = New System.Drawing.Point(281, 43)
+        Me.lblMileage.Name = "lblMileage"
+        Me.lblMileage.Size = New System.Drawing.Size(47, 13)
+        Me.lblMileage.TabIndex = 47
+        Me.lblMileage.Text = "Mileage:"
+        '
+        'lblNCVUnit
+        '
+        Me.lblNCVUnit.AutoSize = true
+        Me.lblNCVUnit.Location = New System.Drawing.Point(199, 43)
+        Me.lblNCVUnit.Name = "lblNCVUnit"
+        Me.lblNCVUnit.Size = New System.Drawing.Size(44, 13)
+        Me.lblNCVUnit.TabIndex = 46
+        Me.lblNCVUnit.Text = "[MJ/kg]"
+        '
+        'tbNCV
+        '
+        Me.tbNCV.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left)  _
+            Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
+        Me.tbNCV.Location = New System.Drawing.Point(117, 40)
+        Me.tbNCV.Name = "tbNCV"
+        Me.tbNCV.Size = New System.Drawing.Size(76, 20)
+        Me.tbNCV.TabIndex = 45
+        '
+        'lblNCV
+        '
+        Me.lblNCV.AutoSize = true
+        Me.lblNCV.Location = New System.Drawing.Point(4, 43)
+        Me.lblNCV.Name = "lblNCV"
+        Me.lblNCV.Size = New System.Drawing.Size(79, 13)
+        Me.lblNCV.TabIndex = 44
+        Me.lblNCV.Text = "NCV Test Fuel:"
+        '
         'Label8
         '
         Me.Label8.AutoSize = true
         Me.Label8.Location = New System.Drawing.Point(3, 11)
         Me.Label8.Name = "Label8"
-        Me.Label8.Size = New System.Drawing.Size(108, 13)
+        Me.Label8.Size = New System.Drawing.Size(111, 13)
         Me.Label8.TabIndex = 43
-        Me.Label8.Text = "Manufacturer Record"
+        Me.Label8.Text = "Manufacturer Record:"
         '
         'tbManufacturerRecord
         '
@@ -615,7 +681,7 @@ Partial Class VectoVTPJobForm
         Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
         Me.CancelButton = Me.ButCancel
-        Me.ClientSize = New System.Drawing.Size(944, 606)
+        Me.ClientSize = New System.Drawing.Size(944, 631)
         Me.Controls.Add(Me.pnManufacturerRecord)
         Me.Controls.Add(Me.Label5)
         Me.Controls.Add(Me.GroupBox1)
@@ -719,4 +785,10 @@ End Sub
     Friend WithEvents Label8 As Label
     Friend WithEvents tbManufacturerRecord As TextBox
     Friend WithEvents ButtonManR As Button
+    Friend WithEvents lblMileageUnit As Label
+    Friend WithEvents tbMileage As TextBox
+    Friend WithEvents lblMileage As Label
+    Friend WithEvents lblNCVUnit As Label
+    Friend WithEvents tbNCV As TextBox
+    Friend WithEvents lblNCV As Label
 End Class
diff --git a/VECTO/GUI/VectoVTPJobForm.vb b/VECTO/GUI/VectoVTPJobForm.vb
index 07aaeba47f..05e9f9ce6b 100644
--- a/VECTO/GUI/VectoVTPJobForm.vb
+++ b/VECTO/GUI/VectoVTPJobForm.vb
@@ -200,6 +200,9 @@ Public Class VectoVTPJobForm
 
         PopulateAuxiliaryList(auxInput)
 
+        tbMileage.Text = if(Cfg.DeclMode, inputData.JobInputData.Mileage.ConvertToKiloMeter().Value.ToGUIFormat(), "")
+        tbNCV.Text = if (Cfg.DeclMode, inputData.JobInputData.NetCalorificValueTestFuel.ConvertToMegaJoulePerKilogram().Value.ToGUIFormat(), "")
+
         Dim coefficients As Double() = vectoJob.FanPowerCoefficents.ToArray()
         If (coefficients.Length >= 1) Then
             tbC1.Text = coefficients(0).ToGUIFormat()
@@ -280,6 +283,10 @@ Public Class VectoVTPJobForm
             vectoJob.CycleFiles.Add(sb)
         Next
 
+        vectoJob.Mileage = tbMileage.Text.ToDouble(0).SI(Unit.SI.Kilo.Meter).Cast(of Meter)
+
+        vectoJob.NetCalorificValueTestFuel = tbNCV.Text.ToDouble(0).SI(Unit.SI.Mega.Joule.Per.Kilo.Gramm).Cast(of JoulePerKilogramm)
+
         vectoJob.FanCoefficients = New Double() {
             tbC1.Text.ToDouble(0),
             tbC2.Text.ToDouble(0),
@@ -703,6 +710,8 @@ Public Class VectoVTPJobForm
             tbManufacturerRecord.Text = GetFilenameWithoutDirectory(ManRXMLFileBrowser.Files(0), GetPath(VectoFile))
         End If
     End Sub
+
+ 
 End Class
 
 
diff --git a/VECTO/Input Files/VectoEPTPJob.vb b/VECTO/Input Files/VectoEPTPJob.vb
index 671c0cd6f2..ccac7979ea 100644
--- a/VECTO/Input Files/VectoEPTPJob.vb	
+++ b/VECTO/Input Files/VectoEPTPJob.vb	
@@ -128,6 +128,9 @@ Public Class VectoVTPJob
    Public ReadOnly Property VectoJobHash As IVectoHash Implements IVTPDeclarationJobInputData.VectoJobHash
 
     Public ReadOnly Property VectoManufacturerReportHash As IVectoHash Implements IVTPDeclarationJobInputData.VectoManufacturerReportHash
+    Public Property Mileage As Meter Implements IVTPDeclarationJobInputData.Mileage
+   
+    Public Property NetCalorificValueTestFuel As JoulePerKilogramm Implements IVTPDeclarationJobInputData.NetCalorificValueTestFuel
 
 
     Public ReadOnly Property Cycles As IList(Of ICycleData) Implements IVTPEngineeringJobInputData.Cycles
diff --git a/VECTO/OutputData/JSONFileWriter.vb b/VECTO/OutputData/JSONFileWriter.vb
index 3f1464574e..e1060c9e3f 100644
--- a/VECTO/OutputData/JSONFileWriter.vb
+++ b/VECTO/OutputData/JSONFileWriter.vb
@@ -372,6 +372,8 @@ Public Class JSONFileWriter
 		body.Add("DeclarationVehicle", GetRelativePath(job.Vehicle.Source, Path.GetDirectoryName(filename)))
         if declarationmode Then
             body.add("ManufacturerRecord", GetRelativePath(job.ManufacturerReportInputData.Source, Path.GetDirectoryName(filename)))
+            body.Add("Mileage", job.Mileage.ConvertToKiloMeter().Value)
+            body.add("NCVTestFuel", job.NetCalorificValueTestFuel.ConvertToMegaJoulePerKilogram().Value())
         End If
 		body.Add("FanPowerCoefficients", job.FanPowerCoefficents)
 		body.Add("FanDiameter", job.FanDiameter.Value())
diff --git a/VectoCommon/VectoCommon/InputData/VTPDeclarationInputData.cs b/VectoCommon/VectoCommon/InputData/VTPDeclarationInputData.cs
index c63183b4de..3b7d829092 100644
--- a/VectoCommon/VectoCommon/InputData/VTPDeclarationInputData.cs
+++ b/VectoCommon/VectoCommon/InputData/VTPDeclarationInputData.cs
@@ -54,6 +54,10 @@ namespace TUGraz.VectoCommon.InputData
 
 		IVectoHash VectoManufacturerReportHash { get; }
 
+		Meter Mileage { get; }
+
+		JoulePerKilogramm NetCalorificValueTestFuel { get; }
+
 		IList<ICycleData> Cycles { get; }
 
 		IEnumerable<double> FanPowerCoefficents { get; }
diff --git a/VectoCommon/VectoCommon/Utils/SIConvertExtensionMethods.cs b/VectoCommon/VectoCommon/Utils/SIConvertExtensionMethods.cs
index 923dc0bfeb..575608ab10 100644
--- a/VectoCommon/VectoCommon/Utils/SIConvertExtensionMethods.cs
+++ b/VectoCommon/VectoCommon/Utils/SIConvertExtensionMethods.cs
@@ -201,7 +201,12 @@ namespace TUGraz.VectoCommon.Utils
         {
             return new ConvertedSI(value.Value() * Kilo, "mm");
         }
-    }
+
+		public static ConvertedSI ConvertToMegaJoulePerKilogram(this JoulePerKilogramm value)
+		{
+			return new ConvertedSI(value.Value() / Kilo / Kilo, "MJ/kg");
+		}
+	}
 }
 
 
diff --git a/VectoCommon/VectoCommon/Utils/SIUtils.cs b/VectoCommon/VectoCommon/Utils/SIUtils.cs
index 8516ee8955..c99f8320c1 100644
--- a/VectoCommon/VectoCommon/Utils/SIUtils.cs
+++ b/VectoCommon/VectoCommon/Utils/SIUtils.cs
@@ -206,6 +206,18 @@ namespace TUGraz.VectoCommon.Utils
 			}
 		}
 
+		/// <summary>
+		/// Quantifier for Mega (1E6).
+		/// </summary>
+		public UnitInstance Mega
+		{
+			get {
+				Factor *= Math.Pow(1E6, _exponent * _reciproc);
+
+				return this;
+			}
+		}
+
 		/// <summary>
 		/// [m]
 		/// </summary>
diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
index ccdc194e12..b31860e425 100644
--- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs
@@ -696,6 +696,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 
 		public IVectoHash VectoManufacturerReportHash { get; }
 
+		public Meter Mileage
+		{
+			get { return Body.GetEx<double>("Mileage").SI(Unit.SI.Kilo.Meter).Cast<Meter>(); }
+		}
+
+		public JoulePerKilogramm NetCalorificValueTestFuel
+		{
+			get { return Body.GetEx<double>("NCVTestFuel").SI(Unit.SI.Mega.Joule.Per.Kilo.Gramm).Cast<JoulePerKilogramm>(); }
+		}
+
 		string IManufacturerReport.Source { get { return Body["ManufacturerRecord"].Value<string>(); } }
 
 		public IList<ICycleData> Cycles
diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs
index 460fc20b60..a209cf9728 100644
--- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs
+++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationVTPModeVectoRunDataFactory.cs
@@ -16,7 +16,6 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
 {
 	internal class DeclarationVTPModeVectoRunDataFactory : IVectoRunDataFactory
 	{
-
 		protected IVTPDeclarationJobInputData JobInputData;
 		private DriverData _driverdata;
 		private AirdragData _airdragData;
@@ -33,8 +32,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
 
 		public IVTPReport Report;
 
-		public DeclarationVTPModeVectoRunDataFactory(IVTPDeclarationInputDataProvider ivtpProvider, IVTPReport report) : this(ivtpProvider.JobInputData, report)
-		{}
+		public DeclarationVTPModeVectoRunDataFactory(IVTPDeclarationInputDataProvider ivtpProvider, IVTPReport report) : this(
+			ivtpProvider.JobInputData, report) { }
 
 		protected DeclarationVTPModeVectoRunDataFactory(IVTPDeclarationJobInputData job, IVTPReport report)
 		{
@@ -54,17 +53,19 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
 		{
 			var powertrainConfig = new VectoRunData() {
 				VehicleData =
-					_dao.CreateVehicleData(JobInputData.Vehicle, _segment.Missions.First(),
-											_segment.Missions.First().Loadings.First().Value, _segment.MunicipalBodyWeight),
+					_dao.CreateVehicleData(
+						JobInputData.Vehicle, _segment.Missions.First(),
+						_segment.Missions.First().Loadings.First().Value, _segment.MunicipalBodyWeight),
 				AirdragData = _airdragData,
 				EngineData = _engineData,
 				GearboxData = _gearboxData,
 				AxleGearData = _axlegearData,
 				Retarder = _retarderData,
 				Aux =
-					_dao.CreateAuxiliaryData(JobInputData.Vehicle.AuxiliaryInputData(),
-											_segment.Missions.First().MissionType,
-											_segment.VehicleClass),
+					_dao.CreateAuxiliaryData(
+						JobInputData.Vehicle.AuxiliaryInputData(),
+						_segment.Missions.First().MissionType,
+						_segment.VehicleClass),
 			};
 			powertrainConfig.VehicleData.VehicleClass = _segment.VehicleClass;
 			Report.InputDataHash = JobInputData.VectoJobHash;
@@ -138,6 +139,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
 			// simulate the Measured cycle
 			foreach (var cycle in JobInputData.Cycles) {
 				var drivingCycle = DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, cycle.Name, false);
+
 				// Loading is not relevant as we use P_wheel
 				var runData = CreateVectoRunData(_segment, _segment.Missions.First(), 0.SI<Kilogram>());
 				runData.Cycle = new DrivingCycleProxy(drivingCycle, cycle.Name);
@@ -151,18 +153,29 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
 				runData.Mission = new Mission() {
 					MissionType = MissionType.VerificationTest
 				};
+				var ncvStd = DeclarationData.FuelData.Lookup(JobInputData.Vehicle.EngineInputData.FuelType).LowerHeatingValue;
+				var ncvCorrection = ncvStd / JobInputData.NetCalorificValueTestFuel;
+				var mileageCorrection = GetMileagecorrectionFactor(JobInputData.Mileage);
 				runData.VTPData = new VTPData() {
-					CorrectionFactor = 1,
-					FuelNetCalorificValue = 0.SI<JoulePerKilogramm>()
+					CorrectionFactor = ncvCorrection * mileageCorrection,
+					FuelNetCalorificValue = JobInputData.NetCalorificValueTestFuel //0.SI<JoulePerKilogramm>()
 				};
 				yield return runData;
 			}
+		}
+
+		private double GetMileagecorrectionFactor(Meter mileage)
+		{
+			if (mileage > DeclarationData.VTPMode.RunInThreshold) {
+				return 1;
+			}
 
+			return DeclarationData.VTPMode.EvolutionCoefficient + (1 - DeclarationData.VTPMode.EvolutionCoefficient) * mileage /
+					DeclarationData.VTPMode.RunInThreshold;
 		}
 
 		protected VectoRunData CreateVectoRunData(Segment segment, Mission mission, Kilogram loading)
 		{
-			
 			return new VectoRunData {
 				JobName = JobInputData.Vehicle.VIN,
 				EngineData = _engineData,
@@ -181,7 +194,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
 			};
 		}
 
-		protected virtual List<VectoRunData.AuxData> CreateVTPAuxData(DeclarationDataAdapter dao, IVehicleDeclarationInputData vehicle, Segment segment)
+		protected virtual List<VectoRunData.AuxData> CreateVTPAuxData(
+			DeclarationDataAdapter dao, IVehicleDeclarationInputData vehicle, Segment segment)
 		{
 			var auxRD = dao.CreateAuxiliaryData(
 								vehicle.AuxiliaryInputData(), MissionType.RegionalDelivery, segment.VehicleClass)
diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
index 111825b14a..f8888def8e 100644
--- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
+++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
@@ -502,6 +502,9 @@ namespace TUGraz.VectoCore.Models.Declaration
 
 		public static class VTPMode
 		{
+			public static readonly Meter RunInThreshold = 15000.SI(Unit.SI.Kilo.Meter).Cast<Meter>();
+			public const double EvolutionCoefficient = 0.98;
+
 			public const MissionType SelectedMission = MissionType.LongHaul;
 			public const LoadingType SelectedLoading = LoadingType.ReferenceLoad;
 		}
diff --git a/VectoCore/VectoCoreTest/TestData/Integration/VTPMode/GenericVehicle/class_5_generic vehicle_DECL.vecto b/VectoCore/VectoCoreTest/TestData/Integration/VTPMode/GenericVehicle/class_5_generic vehicle_DECL.vecto
index 7f01870784..2382aa6698 100644
--- a/VectoCore/VectoCoreTest/TestData/Integration/VTPMode/GenericVehicle/class_5_generic vehicle_DECL.vecto	
+++ b/VectoCore/VectoCoreTest/TestData/Integration/VTPMode/GenericVehicle/class_5_generic vehicle_DECL.vecto	
@@ -1,7 +1,7 @@
 {
   "Header": {
     "CreatedBy": "",
-    "Date": "2018-04-27T10:40:05.4111247Z",
+    "Date": "2018-05-02T11:40:41.8847449Z",
     "AppVersion": "3",
     "FileVersion": 4
   },
@@ -9,6 +9,8 @@
     "SavedInDeclMode": true,
     "DeclarationVehicle": "Tractor_4x2_vehicle-class-5_Generic vehicle.xml",
     "ManufacturerRecord": "Tractor_4x2_vehicle-class-5_Generic vehicle.RSLT_MANUFACTURER.xml",
+    "Mileage": 10000.0,
+    "NCVTestFuel": 41.0,
     "FanPowerCoefficients": [
       5.5E-07,
       15.0,
-- 
GitLab