From ec6c3ba7c65a8076e01cec78e82d8ca47ae9b239 Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Wed, 27 Jul 2016 16:30:04 +0200
Subject: [PATCH] new steering pump declaration data from whitebook

---
 .../40t_Long_Haul_Truck.vecto                 |   2 +-
 .../Utils/EnumerableExtensionMethods.cs       |   4 +-
 .../DeclarationDataAdapter.cs                 |   2 +-
 .../Models/Declaration/LookupData.cs          |   9 +-
 .../Models/Declaration/SteeringPump.cs        | 119 +++++++++++-------
 .../Resources/Declaration/VAUX/SP-Axles.csv   |  10 +-
 .../Resources/Declaration/VAUX/SP-Table.csv   |  28 ++---
 .../Resources/Declaration/VAUX/SP-Tech.csv    |   4 +-
 VectoCore/VectoCore/VectoCore.csproj          |   1 +
 .../Models/Declaration/DeclarationDataTest.cs |  42 +++----
 .../Models/Simulation/AuxTests.cs             |   5 +-
 11 files changed, 129 insertions(+), 97 deletions(-)

diff --git a/Generic Vehicles/Declaration Mode/40t Long Haul Truck/40t_Long_Haul_Truck.vecto b/Generic Vehicles/Declaration Mode/40t Long Haul Truck/40t_Long_Haul_Truck.vecto
index ca10668c60..3174f84f58 100644
--- a/Generic Vehicles/Declaration Mode/40t Long Haul Truck/40t_Long_Haul_Truck.vecto	
+++ b/Generic Vehicles/Declaration Mode/40t Long Haul Truck/40t_Long_Haul_Truck.vecto	
@@ -28,7 +28,7 @@
         "ID": "STP",
         "Type": "Steering pump",
         "Path": "<NOFILE>",
-        "Technology": "Variable displacement"
+        "Technology": "Variable displacement mech. controlled"
       },
       {
         "ID": "AC",
diff --git a/VectoCommon/VectoCommon/Utils/EnumerableExtensionMethods.cs b/VectoCommon/VectoCommon/Utils/EnumerableExtensionMethods.cs
index c03a7c3bea..ad25e2e961 100644
--- a/VectoCommon/VectoCommon/Utils/EnumerableExtensionMethods.cs
+++ b/VectoCommon/VectoCommon/Utils/EnumerableExtensionMethods.cs
@@ -38,9 +38,9 @@ namespace TUGraz.VectoCommon.Utils
 {
 	public static class EnumerableExtensionMethods
 	{
-		public static IEnumerable<double> ToDouble(this IEnumerable<string> self)
+		public static IEnumerable<double> ToDouble(this IEnumerable<string> self, double? defaultValue = null)
 		{
-			return self.Select(s => s.ToDouble());
+			return self.Select(s => s.ToDouble(defaultValue));
 		}
 
 		public static bool SequenceEqualFast<T>(this IEnumerable<T> self, IEnumerable<T> other) where T : IComparable
diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs
index 77cc69ecfa..d8627ac1fd 100644
--- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs
+++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs
@@ -254,7 +254,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
 						aux.ID = Constants.Auxiliaries.IDs.Fan;
 						break;
 					case AuxiliaryType.SteeringPump:
-						aux.PowerDemand = DeclarationData.SteeringPump.Lookup(mission, hvdClass, auxData.Technology);
+						aux.PowerDemand = DeclarationData.SteeringPump.Lookup(mission, hvdClass, new[] { auxData.Technology });
 						aux.ID = Constants.Auxiliaries.IDs.SteeringPump;
 						break;
 					case AuxiliaryType.HeatingVentilationAirCondition:
diff --git a/VectoCore/VectoCore/Models/Declaration/LookupData.cs b/VectoCore/VectoCore/Models/Declaration/LookupData.cs
index cc6b34ab7f..8fff0ce724 100644
--- a/VectoCore/VectoCore/Models/Declaration/LookupData.cs
+++ b/VectoCore/VectoCore/Models/Declaration/LookupData.cs
@@ -29,6 +29,7 @@
 *   Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
 */
 
+using System;
 using System.Collections.Generic;
 using System.Data;
 using TUGraz.VectoCommon.Models;
@@ -60,7 +61,6 @@ namespace TUGraz.VectoCore.Models.Declaration
 		}
 	}
 
-
 	public abstract class LookupData<TKey, TValue> : LookupData
 	{
 		protected Dictionary<TKey, TValue> Data = new Dictionary<TKey, TValue>();
@@ -73,7 +73,12 @@ namespace TUGraz.VectoCore.Models.Declaration
 
 	public abstract class LookupData<TKey1, TKey2, TValue> : LookupData
 	{
-		public abstract TValue Lookup(TKey1 key1, TKey2 key2);
+		protected Dictionary<Tuple<TKey1, TKey2>, TValue> Data = new Dictionary<Tuple<TKey1, TKey2>, TValue>();
+
+		public virtual TValue Lookup(TKey1 key1, TKey2 key2)
+		{
+			return Data[Tuple.Create(key1, key2)];
+		}
 	}
 
 	public abstract class LookupData<TKey1, TKey2, TKey3, TValue> : LookupData
diff --git a/VectoCore/VectoCore/Models/Declaration/SteeringPump.cs b/VectoCore/VectoCore/Models/Declaration/SteeringPump.cs
index e411a7be0b..426b6d172b 100644
--- a/VectoCore/VectoCore/Models/Declaration/SteeringPump.cs
+++ b/VectoCore/VectoCore/Models/Declaration/SteeringPump.cs
@@ -39,67 +39,64 @@ using TUGraz.VectoCore.Utils;
 
 namespace TUGraz.VectoCore.Models.Declaration
 {
-	public sealed class SteeringPump : LookupData<MissionType, VehicleClass, string, Watt>
+	public sealed class SteeringPump : LookupData<MissionType, VehicleClass, IEnumerable<string>, Watt>
 	{
 		private const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.VAUX.SP-Table.csv";
 		private readonly SteeringPumpTechnologies _technologies = new SteeringPumpTechnologies();
 		private readonly SteeringPumpAxles _axles = new SteeringPumpAxles();
-		private readonly ElectricSystem.Alternator _alternator = new ElectricSystem.Alternator();
 
-		private readonly Dictionary<Tuple<MissionType, VehicleClass>, Watt[]> _data =
-			new Dictionary<Tuple<MissionType, VehicleClass>, Watt[]>();
+		private readonly Dictionary<Tuple<MissionType, VehicleClass>, SteeringPumpValues<Watt>> _data =
+			new Dictionary<Tuple<MissionType, VehicleClass>, SteeringPumpValues<Watt>>();
 
 		public SteeringPump()
 		{
 			ParseData(ReadCsvResource(ResourceId));
 		}
 
-		public override Watt Lookup(MissionType mission, VehicleClass hdvClass, string technology)
+		public override Watt Lookup(MissionType mission, VehicleClass hdvClass, IEnumerable<string> technologies)
 		{
+			SteeringPumpValues<Watt> powerShares;
 			try {
-				var shares = _data[Tuple.Create(mission, hdvClass)];
-				var factors = _technologies.Lookup(technology);
-				return shares[0] * factors.UnloadedFriction + shares[1] * factors.Banking + shares[2] * factors.Steering;
+				powerShares = _data[Tuple.Create(mission, hdvClass)];
 			} catch (KeyNotFoundException) {
 				throw new VectoException(
-					"Auxiliary Lookup Error: No value found for Steering Pump with mission '{0}', HDVClass '{1}' and technology '{3}'",
-					mission, hdvClass, technology);
+					"Auxiliary Lookup Error: No value found for Steering Pump. Mission: '{0}', HDVClass: '{1}'", mission, hdvClass);
 			}
+
+			var sum = 0.SI<Watt>();
+			var i = 1;
+			foreach (var technology in technologies) {
+				var factors = _technologies.Lookup(technology, mission);
+				var axles = _axles.Lookup(mission, i);
+				sum += powerShares.UnloadedFriction * axles.UnloadedFriction * factors.UnloadedFriction
+						+ powerShares.Banking * axles.Banking * factors.Banking
+						+ powerShares.Steering * axles.Banking * factors.Steering;
+				i++;
+			}
+			return sum;
 		}
 
 		protected override void ParseData(DataTable table)
 		{
-			_data.Clear();
 			NormalizeTable(table);
+			_data.Clear();
 
 			foreach (DataRow row in table.Rows) {
 				var hdvClass = VehicleClassHelper.Parse(row.Field<string>("hdvclass/powerdemandpershare"));
 				foreach (var mission in EnumHelper.GetValues<MissionType>()) {
-					var values = row.Field<string>(mission.ToString().ToLower()).Split('/').ToDouble();
-					values = values.Concat(Enumerable.Repeat(0.0, 3));
-
-					_data[Tuple.Create(mission, hdvClass)] = values.Take(4).SI<Watt>().ToArray();
+					var values =
+						row.Field<string>(mission.ToString().ToLower()).Split('/')
+							.Select(v => v.ToDouble() / 100.0).Concat(0.0.Repeat(3)).SI<Watt>().ToList();
+					_data[Tuple.Create(mission, hdvClass)] = new SteeringPumpValues<Watt>(values[0], values[1], values[2]);
 				}
 			}
 		}
 
-		private sealed class SteeringPumpTechnologies : LookupData<string, SteeringPumpTechnologies.CorrectionFactors>
+		private sealed class SteeringPumpTechnologies : LookupData<string, SteeringPumpValues<double>>
 		{
-			private const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.VAUX.SP-Tech.csv";
+			private readonly ElectricSystem.Alternator _alternator = new ElectricSystem.Alternator();
 
-			internal struct CorrectionFactors
-			{
-				public double UnloadedFriction;
-				public double Banking;
-				public double Steering;
-
-				public CorrectionFactors(double unloadedFriction, double banking, double steering)
-				{
-					UnloadedFriction = unloadedFriction;
-					Banking = banking;
-					Steering = steering;
-				}
-			}
+			private const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.VAUX.SP-Tech.csv";
 
 			public SteeringPumpTechnologies()
 			{
@@ -108,24 +105,38 @@ namespace TUGraz.VectoCore.Models.Declaration
 
 			protected override void ParseData(DataTable table)
 			{
+				NormalizeTable(table);
+				Data.Clear();
+
 				Data = table.Rows.Cast<DataRow>().ToDictionary(
-					key => key.Field<string>("Scaling Factors"),
-					value => new CorrectionFactors(value.ParseDouble("UF"), value.ParseDouble("B"), value.ParseDouble("S")));
+					key => key.Field<string>("Technology"),
+					value => new SteeringPumpValues<double>(value.ParseDouble("UF"), value.ParseDouble("B"), value.ParseDouble("S")));
+			}
+
+			[Obsolete("Use Lookup(string, MissionType) instead!", true)]
+			public new SteeringPumpValues<double> Lookup(string tech)
+			{
+				throw new NotImplementedException("Use Lookup(string, MissionType) instead!");
 			}
 
-			public override CorrectionFactors Lookup(string tech)
+			public SteeringPumpValues<double> Lookup(string tech, MissionType mission)
 			{
 				try {
-					return Data[tech];
+					var values = Data[tech];
+					if (tech == "Electric") {
+						values.Banking /= _alternator.Lookup(mission, "");
+						values.Steering /= _alternator.Lookup(mission, "");
+					}
+					return values;
 				} catch (KeyNotFoundException) {
 					throw new VectoException("Auxiliary Lookup Error: No value found for SteeringPump Technology with key '{0}'", tech);
 				}
 			}
 		}
 
-		private sealed class SteeringPumpAxles : LookupData<string, double[]>
+		private sealed class SteeringPumpAxles : LookupData<MissionType, int, SteeringPumpValues<double>>
 		{
-			private const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.VAUX.SP-Tech.csv";
+			private const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.VAUX.SP-Axles.csv";
 
 			public SteeringPumpAxles()
 			{
@@ -134,19 +145,33 @@ namespace TUGraz.VectoCore.Models.Declaration
 
 			protected override void ParseData(DataTable table)
 			{
-				Data = table.Rows.Cast<DataRow>().ToDictionary(
-					key => key.Field<string>("Scaling Factors"),
-					value => new[] { value.ParseDouble("U"), value.ParseDouble("F"), value.ParseDouble("B"), value.ParseDouble("S") });
-			}
-
-			public override double[] Lookup(string tech)
-			{
-				try {
-					return Data[tech];
-				} catch (KeyNotFoundException) {
-					throw new VectoException("Auxiliary Lookup Error: No value found for SteeringPump Technology with key '{0}'", tech);
+				NormalizeTable(table);
+				Data.Clear();
+
+				var i = 1;
+				foreach (DataRow row in table.Rows) {
+					foreach (MissionType mission in Enum.GetValues(typeof(MissionType))) {
+						var values =
+							row.Field<string>(mission.ToString().ToLowerInvariant()).Split('/').ToDouble(0).Concat(0.0.Repeat(3)).ToList();
+						Data[Tuple.Create(mission, i)] = new SteeringPumpValues<double>(values[0], values[1], values[2]);
+					}
+					i++;
 				}
 			}
 		}
 	}
+
+	internal struct SteeringPumpValues<T>
+	{
+		public T UnloadedFriction;
+		public T Banking;
+		public T Steering;
+
+		public SteeringPumpValues(T unloadedFriction, T banking, T steering)
+		{
+			UnloadedFriction = unloadedFriction;
+			Banking = banking;
+			Steering = steering;
+		}
+	}
 }
\ No newline at end of file
diff --git a/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Axles.csv b/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Axles.csv
index 307e4278ae..6344dfdebe 100644
--- a/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Axles.csv
+++ b/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Axles.csv
@@ -1,5 +1,5 @@
-No steered axles / power demand percentage [%],Long haul,Regional delivery,Urban delivery,Municipal utility,construction
-1,100/100/100,100/100/100,100/100/100,100/100/100,100/100/100
-2,100/70/70,100/70/70,100/70/70,100/70/70,100/70/70
-3,100/50/50,100/50/50,100/50/50,100/50/50,100/50/50
-4,100/50/50,100/50/50,100/50/50,100/50/50,100/50/50
+Steered axles / power demand percentage [%],Long haul,Regional delivery,Urban delivery,Municipal utility,construction,Heavy Urban,Urban,Suburban,Interurban,Coach
+1,100/100/100,100/100/100,100/100/100,100/100/100,100/100/100,0,0,0,0,0
+2,100/70/70,100/70/70,100/70/70,100/70/70,100/70/70,0,0,0,0,0
+3,100/50/50,100/50/50,100/50/50,100/50/50,100/50/50,0,0,0,0,0
+4,100/50/50,100/50/50,100/50/50,100/50/50,100/50/50,0,0,0,0,0
diff --git a/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Table.csv b/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Table.csv
index 33891fa915..754b6ef995 100644
--- a/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Table.csv
+++ b/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Table.csv
@@ -1,14 +1,14 @@
-HDV Class / Power demand per share [W],Long haul,Regional delivery,Urban delivery,Municipal utility,Construction
-1,,240/20/20,220/20/30,,
-2,340/30/0,290/30/20,260/20/30,,
-3,,310/30/30,280/30/40,,
-4,510/100/0,490/40/40,,430/30/50,
-5,600/120/0,540/90/40,480/80/60,,
-6,,,,,
-7,,,,,
-8,,,,,
-9,600/120/0,490/60/40,,430/30/50,
-10,450/120/0,440/90/40,,,
-11,600/120/0,490/60/40,,430/30/50,640/50/80
-12,450/120/0,440/90/40,,,640/50/80
-16,,,,,640/50/80
+HDV Class / Power demand per share [W],Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach
+1,0,240/20/20,220/20/30,0,0,0,0,0,0,0
+2,340/30/0,290/30/20,260/20/30,0,0,0,0,0,0,0
+3,0,310/30/30,280/30/40,0,0,0,0,0,0,0
+4,510/100/0,490/40/40,0,430/30/50,0,0,0,0,0,0
+5,600/120/0,540/90/40,480/80/60,0,0,0,0,0,0,0
+6,0,0,0,0,0,0,0,0,0,0
+7,0,0,0,0,0,0,0,0,0,0
+8,0,0,0,0,0,0,0,0,0,0
+9,600/120/0,490/60/40,0,430/30/50,0,0,0,0,0,0
+10,450/120/0,440/90/40,0,0,0,0,0,0,0,0
+11,600/120/0,490/60/40,0,430/30/50,640/50/80,0,0,0,0,0
+12,450/120/0,440/90/40,0,0,640/50/80,0,0,0,0,0
+16,0,0,0,0,640/50/80,0,0,0,0,0
diff --git a/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Tech.csv b/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Tech.csv
index 00253f7d70..594c6320c6 100644
--- a/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Tech.csv
+++ b/VectoCore/VectoCore/Resources/Declaration/VAUX/SP-Tech.csv
@@ -1,7 +1,7 @@
-Technology / Scaling Factors [-],CF_UF,CF_B,CF_S
+Technology,UF,B,S
 Fixed displacement,1,1,1
 Fixed displacement elec. controlled,0.95,1,1
 Dual displacement,0.85,0.85,0.85
 Variable displacement mech. controlled,0.75,0.75,0.75
 Variable displacement elec. controlled,0.6,0.6,0.6
-Electric,0,1.5/eff_alt,1/eff_alt
+Electric,0,1.5,1
diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj
index 6280561b3c..c05c592e2e 100644
--- a/VectoCore/VectoCore/VectoCore.csproj
+++ b/VectoCore/VectoCore/VectoCore.csproj
@@ -328,6 +328,7 @@
     <EmbeddedResource Include="Resources\Declaration\LAC-DF-Vtarget.csv" />
     <EmbeddedResource Include="Resources\Declaration\Body_Trailers_Weights.csv" />
     <EmbeddedResource Include="Resources\Declaration\Payloads.csv" />
+    <EmbeddedResource Include="Resources\Declaration\VAUX\SP-Axles.csv" />
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="Resources\Declaration\Report\4x2r.png" />
diff --git a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs
index d8f0fbc693..3208636862 100644
--- a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs
+++ b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs
@@ -420,33 +420,33 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
 		TestCase("Fixed displacement", VehicleClass.Class8, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
 		TestCase("Fixed displacement", VehicleClass.Class9, new[] { 720, 550, 0, 550, 0, 0, 0, 0, 0, 0 }),
 		TestCase("Fixed displacement", VehicleClass.Class10, new[] { 570, 530, 0, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class1, new[] { 0, 156, 162, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class2, new[] { 222, 192, 186, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class3, new[] { 0, 204, 210, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class4, new[] { 366, 318, 0, 318, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class5, new[] { 432, 378, 372, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class6, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class7, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class8, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class9, new[] { 432, 330, 0, 330, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Variable displacement", VehicleClass.Class10, new[] { 342, 318, 0, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class1, new[] { 0, 225, 235, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class2, new[] { 322, 278, 269, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class3, new[] { 0, 295, 304, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class4, new[] { 531, 460, 0, 460, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class5, new[] { 627, 546, 540, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class6, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class7, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class8, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class9, new[] { 627, 478, 0, 478, 0, 0, 0, 0, 0, 0 }),
-		TestCase("Hydraulic supported by electric", VehicleClass.Class10, new[] { 498, 461, 0, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class1, new[] { 0, 156, 162, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class2, new[] { 222, 192, 186, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class3, new[] { 0, 204, 210, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class4, new[] { 366, 318, 0, 318, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class5, new[] { 432, 378, 372, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class6, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class7, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class8, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class9, new[] { 432, 330, 0, 330, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement mech. controlled", VehicleClass.Class10, new[] { 342, 318, 0, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class1, new[] { 0, 225, 235, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class2, new[] { 322, 278, 269, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class3, new[] { 0, 295, 304, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class4, new[] { 531, 460, 0, 460, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class5, new[] { 627, 546, 540, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class6, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class7, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class8, new[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class9, new[] { 627, 478, 0, 478, 0, 0, 0, 0, 0, 0 }),
+		TestCase("Variable displacement elec. controlled", VehicleClass.Class10, new[] { 498, 461, 0, 0, 0, 0, 0, 0, 0, 0 }),
 		]
 		public void AuxSteeringPumpTest(string technology, VehicleClass hdvClass, int[] expected)
 		{
 			var sp = DeclarationData.SteeringPump;
 
 			for (var i = 0; i < Missions.Length; i++) {
-				var value = sp.Lookup(Missions[i], hdvClass, technology);
+				var value = sp.Lookup(Missions[i], hdvClass, new[] { technology });
 				Assert.AreEqual(expected[i], value.Value(), Tolerance);
 			}
 		}
diff --git a/VectoCore/VectoCoreTest/Models/Simulation/AuxTests.cs b/VectoCore/VectoCoreTest/Models/Simulation/AuxTests.cs
index 70d7c3a54d..8e00b01a7f 100644
--- a/VectoCore/VectoCoreTest/Models/Simulation/AuxTests.cs
+++ b/VectoCore/VectoCoreTest/Models/Simulation/AuxTests.cs
@@ -78,7 +78,8 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
 				DeclarationData.Fan.Lookup(MissionType.LongHaul, "Hydraulic driven - Constant displacement pump"));
 			aux.AddConstant("PS", DeclarationData.PneumaticSystem.Lookup(mission, hdvClass));
 			aux.AddConstant("STP",
-				DeclarationData.SteeringPump.Lookup(MissionType.LongHaul, hdvClass, "Variable displacement"));
+				DeclarationData.SteeringPump.Lookup(MissionType.LongHaul, hdvClass,
+					new[] { "Variable displacement mech. controlled" }));
 			aux.AddConstant("ES", DeclarationData.ElectricSystem.Lookup(mission, null));
 			aux.AddConstant("AC",
 				DeclarationData.HeatingVentilationAirConditioning.Lookup(mission, hdvClass));
@@ -104,7 +105,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
 			var testColumns = new[] { "P_aux_FAN", "P_aux_STP", "P_aux_AC", "P_aux_ES", "P_aux_PS", "P_aux" };
 
 			ResultFileHelper.TestModFile(@"TestData\Results\EngineOnlyCycles\40t_Long_Haul_Truck_Long_Haul_Empty Loading.vmod",
-				@"AuxWriteModFileSumFile.vmod", testColumns, testVelocity:false);
+				@"AuxWriteModFileSumFile.vmod", testColumns, testVelocity: false);
 			ResultFileHelper.TestSumFile(@"TestData\Results\EngineOnlyCycles\AuxWriteModFileSumFile.vsum",
 				@"AuxWriteModFileSumFile.vsum");
 		}
-- 
GitLab