From cbf737124144e15d89ecc08320e6b04a069bf991 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Fri, 30 Aug 2019 13:40:14 +0200
Subject: [PATCH] adding testcases for PCC and EcoRoll with ESS

---
 .../Integration/ADAS/ADASTests.cs             | 12 +++
 .../Class5_Tractor_ENG_PCC123EcoSS.vecto      | 52 ++++++++++++
 .../Class5_Tractor_PCC123EcoSS.vveh           | 83 +++++++++++++++++++
 VectoCore/VectoCoreTest/VectoCoreTest.csproj  |  6 ++
 4 files changed, 153 insertions(+)
 create mode 100644 VectoCore/VectoCoreTest/TestData/Integration/ADAS/Group5PCCEng/Class5_Tractor_ENG_PCC123EcoSS.vecto
 create mode 100644 VectoCore/VectoCoreTest/TestData/Integration/ADAS/Group5PCCEng/Class5_Tractor_PCC123EcoSS.vveh

diff --git a/VectoCore/VectoCoreTest/Integration/ADAS/ADASTests.cs b/VectoCore/VectoCoreTest/Integration/ADAS/ADASTests.cs
index 5b4be652fd..1c52efd177 100644
--- a/VectoCore/VectoCoreTest/Integration/ADAS/ADASTests.cs
+++ b/VectoCore/VectoCoreTest/Integration/ADAS/ADASTests.cs
@@ -20,6 +20,7 @@ namespace TUGraz.VectoCore.Tests.Integration.ADAS
 
 		public const string Group5PCC12 = @"TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG_PCC12.vecto";
 		public const string Group5PCC123 = @"TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG_PCC123.vecto";
+		public const string Group5PCC123EcoSS = @"TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG_PCC123EcoSS.vecto";
 
 		protected IXMLInputDataReader xmlInputReader;
 		private IKernel _kernel;
@@ -195,6 +196,17 @@ namespace TUGraz.VectoCore.Tests.Integration.ADAS
 		TestCase(Group5PCC123, 9, TestName = "G5Eng PCC123 Case H"), // Case H
 		TestCase(Group5PCC123, 10, TestName = "G5Eng PCC123 Case I"), // Case I
 		TestCase(Group5PCC123, 11, TestName = "G5Eng PCC123 Case J"), // Case J
+
+		TestCase(Group5PCC123EcoSS, 2, TestName = "G5Eng PCC123-EcoSS Case A"), // Case A
+		TestCase(Group5PCC123EcoSS, 3, TestName = "G5Eng PCC123-EcoSS Case B"), // Case B
+		TestCase(Group5PCC123EcoSS, 4, TestName = "G5Eng PCC123-EcoSS Case C"), // Case C
+		TestCase(Group5PCC123EcoSS, 5, TestName = "G5Eng PCC123-EcoSS Case D"), // Case D
+		TestCase(Group5PCC123EcoSS, 6, TestName = "G5Eng PCC123-EcoSS Case E"), // Case E
+		TestCase(Group5PCC123EcoSS, 7, TestName = "G5Eng PCC123-EcoSS Case F"), // Case F
+		TestCase(Group5PCC123EcoSS, 8, TestName = "G5Eng PCC123-EcoSS Case G"), // Case G
+		TestCase(Group5PCC123EcoSS, 9, TestName = "G5Eng PCC123-EcoSS Case H"), // Case H
+		TestCase(Group5PCC123EcoSS, 10, TestName = "G5Eng PCC123-EcoSS Case I"), // Case I
+		TestCase(Group5PCC123EcoSS, 11, TestName = "G5Eng PCC123-EcoSS Case J"), // Case J
 		]
 		public void TestPCCEngineeringSampleCases(string jobName, int cycleIdx)
 		{
diff --git a/VectoCore/VectoCoreTest/TestData/Integration/ADAS/Group5PCCEng/Class5_Tractor_ENG_PCC123EcoSS.vecto b/VectoCore/VectoCoreTest/TestData/Integration/ADAS/Group5PCCEng/Class5_Tractor_ENG_PCC123EcoSS.vecto
new file mode 100644
index 0000000000..0df3a73e66
--- /dev/null
+++ b/VectoCore/VectoCoreTest/TestData/Integration/ADAS/Group5PCCEng/Class5_Tractor_ENG_PCC123EcoSS.vecto
@@ -0,0 +1,52 @@
+{
+  "Header": {
+    "CreatedBy": " ()",
+    "Date": "2016-10-13T15:52:04.0766564Z",
+    "AppVersion": "3",
+    "FileVersion": 5
+  },
+  "Body": {
+    "SavedInDeclMode": false,
+    "EngineOnlyMode": false,
+    "VehicleFile": "Class5_Tractor_PCC123EcoSS.vveh",
+    "EngineFile": "Engine_325kW_12.7l.veng",
+    "GearboxFile": "AMT_12.vgbx",
+    "AuxiliaryAssembly": "Classic",
+    "AuxiliaryVersion": "CLASSIC",
+    "AdvancedAuxiliaryFilePath": "",
+   "Aux": [
+    ],
+    "Padd": 5000.0,
+    "VACC": "Truck.vacc",
+    "EngineStopStartAtVehicleStopThreshold": 2,
+    "EngineStopStartMaxOffTimespan": 120,
+     "EngineStopStartUtilityFactor":  0.8,  
+    "LAC": {
+      "Enabled": true,
+      "PreviewDistanceFactor": 10.0,
+      "DF_offset": 2.5,
+      "DF_scaling": 1.5,
+      "DF_targetSpeedLookup": "",
+      "Df_velocityDropLookup": ""
+    },
+    "OverSpeedEcoRoll": {
+      "Mode": "Overspeed",
+      "MinSpeed": 50.0,
+      "OverSpeed": 2.5,
+    },
+    "Cycles": [
+      "CrestCoast1.vdri",
+      "CrestCoast2.vdri",
+      "Group5Eng_CaseA.vdri",
+      "Group5Eng_CaseB.vdri",
+      "Group5Eng_CaseC.vdri",
+      "Group5Eng_CaseD.vdri",
+      "Group5Eng_CaseE.vdri",
+      "Group5Eng_CaseF.vdri",
+      "Group5Eng_CaseG.vdri",
+      "Group5Eng_CaseH.vdri",
+      "Group5Eng_CaseI.vdri",
+      "Group5Eng_CaseJ.vdri",
+    ]
+  }
+}
\ No newline at end of file
diff --git a/VectoCore/VectoCoreTest/TestData/Integration/ADAS/Group5PCCEng/Class5_Tractor_PCC123EcoSS.vveh b/VectoCore/VectoCoreTest/TestData/Integration/ADAS/Group5PCCEng/Class5_Tractor_PCC123EcoSS.vveh
new file mode 100644
index 0000000000..842eab3457
--- /dev/null
+++ b/VectoCore/VectoCoreTest/TestData/Integration/ADAS/Group5PCCEng/Class5_Tractor_PCC123EcoSS.vveh
@@ -0,0 +1,83 @@
+{
+  "Header": {
+    "CreatedBy": " ()",
+    "Date": "2016-10-13T08:52:01.3737990Z",
+    "AppVersion": "3",
+    "FileVersion": 8
+  },
+  "Body": {
+    "SavedInDeclMode": false,
+    "VehCat": "Tractor",
+    "CurbWeight": 8229.0,
+    "CurbWeightExtra": 7500.0,
+    "Loading": 19300.0,
+    "MassMax": 18.0,
+    "CdA": 5.3,
+    "rdyn": 492.0,
+    "CdCorrMode": "CdofVdecl",
+    "CdCorrFile": "",
+    "EngineStopStart":  true,
+    "EcoRoll": "withEngineStop",
+    "PredictiveCruiseControl":  "1,2,3",  
+    "Retarder": {
+      "Type": "secondary",
+      "Ratio": 1.0,
+      "File": "Default.vrlm"
+    },
+    "Angledrive": {
+      "Type": "None",
+      "Ratio": 0.0,
+      "LossMap": ""
+    },
+    "PTO": {
+      "Type": "None",
+      "LossMap": "",
+      "Cycle": ""
+    },
+    "AxleConfig": {
+      "Type": "4x2",
+      "Axles": [
+        {
+          "Inertia": 14.9,
+          "Wheels": "315/70 R22.5",
+          "AxleWeightShare": 0.2,
+          "TwinTyres": false,
+          "RRCISO": 0.0055,
+          "FzISO": 33350.0
+        },
+        {
+          "Inertia": 14.9,
+          "Wheels": "315/70 R22.5",
+          "AxleWeightShare": 0.25,
+          "TwinTyres": true,
+          "RRCISO": 0.0065,
+          "FzISO": 33350.0
+        },
+        {
+          "Inertia": 19.2,
+          "Wheels": "385/65 R22.5",
+          "AxleWeightShare": 0.18333,
+          "TwinTyres": false,
+          "RRCISO": 0.0055,
+          "FzISO": 41690.0
+        },
+        {
+          "Inertia": 19.2,
+          "Wheels": "385/65 R22.5",
+          "AxleWeightShare": 0.18333,
+          "TwinTyres": false,
+          "RRCISO": 0.0055,
+          "FzISO": 41690.0
+        },
+        {
+          "Inertia": 19.2,
+          "Wheels": "385/65 R22.5",
+          "AxleWeightShare": 0.18334,
+          "TwinTyres": false,
+          "RRCISO": 0.0055,
+          "FzISO": 41690.0
+        }
+      ]
+    }
+  }
+}
\ No newline at end of file
diff --git a/VectoCore/VectoCoreTest/VectoCoreTest.csproj b/VectoCore/VectoCoreTest/VectoCoreTest.csproj
index 28a001c426..012d6a6715 100644
--- a/VectoCore/VectoCoreTest/VectoCoreTest.csproj
+++ b/VectoCore/VectoCoreTest/VectoCoreTest.csproj
@@ -641,12 +641,18 @@
     <None Include="TestData\Integration\ADAS\Group5PCCEng\Axle_4x2_Tractor.vtlm">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG_PCC123EcoSS.vecto">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <None Include="TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG_PCC123.vecto">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     <None Include="TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG_PCC12.vecto">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_PCC123EcoSS.vveh">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <None Include="TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_PCC123.vveh">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-- 
GitLab