From e78a90bd8af0992f447ae4d699ddab57c7904255 Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Mon, 4 Jul 2016 14:27:37 +0200
Subject: [PATCH] changed calculation of reference load based on payloads and
 standardweights

---
 .../VectoCore/Configuration/Constants.cs      |  3 +-
 .../Models/Declaration/DeclarationData.cs     | 50 ++++++++--------
 .../VectoCore/Models/Declaration/Segments.cs  | 28 +++++----
 .../Models/Declaration/StandardWeights.cs     |  4 +-
 .../Resources/Declaration/SegmentTable.csv    | 59 +++++++++----------
 .../Models/SimulationComponent/GearboxTest.cs |  3 +-
 6 files changed, 78 insertions(+), 69 deletions(-)

diff --git a/VectoCore/VectoCore/Configuration/Constants.cs b/VectoCore/VectoCore/Configuration/Constants.cs
index 9f5ed156bc..51389efcaa 100644
--- a/VectoCore/VectoCore/Configuration/Constants.cs
+++ b/VectoCore/VectoCore/Configuration/Constants.cs
@@ -87,7 +87,6 @@ namespace TUGraz.VectoCore.Configuration
 			/// </summary>
 			public static readonly Second TargetTimeInterval = 0.5.SI<Second>();
 
-
 			/// <summary>
 			/// maximum time interval for the simulation in measured speed mode.
 			/// </summary>
@@ -151,6 +150,8 @@ namespace TUGraz.VectoCore.Configuration
 			public static readonly MeterPerSecond VehicleStopClutchDisengageSpeed = 10.KMPHtoMeterPerSecond();
 
 			public static readonly Meter GearboxLookaheadForAccelerationEstimation = 100.SI<Meter>();
+
+			public static Kilogram MaximumGrossVehicleWeight = 40000.SI<Kilogram>();
 		}
 	}
 }
\ No newline at end of file
diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
index e035689bfe..3b72fa2aa8 100644
--- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
+++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
@@ -43,7 +43,7 @@ using TUGraz.VectoCore.Utils;
 
 namespace TUGraz.VectoCore.Models.Declaration
 {
-	public class DeclarationData
+	internal class DeclarationData
 	{
 		private static DeclarationData _instance;
 		private Segments _segments;
@@ -59,7 +59,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 		private AirDrag _airDrag;
 		private TorqueConverter _torqueConverter;
 		private StandardWeights _standardWeights;
-		public static Kilogram MaximumGrossVehicleWeight = 40000.SI<Kilogram>();
+		private Payloads _payloads;
 
 		public static Wheels Wheels
 		{
@@ -81,31 +81,14 @@ namespace TUGraz.VectoCore.Models.Declaration
 			get { return Instance()._pt1 ?? (Instance()._pt1 = new PT1()); }
 		}
 
-		public static ElectricSystem ElectricSystem
-		{
-			get { return Instance()._electricSystem ?? (Instance()._electricSystem = new ElectricSystem()); }
-		}
-
-		/// <summary>
-		/// Formula for calculating the payload for a given gross vehicle weight.
-		/// (so called "pc-formula", Whitebook Apr 2016, Part 1, p.187)
-		/// </summary>
-		public static Kilogram PayloadForGVW(Kilogram grossVehicleWeight, MissionType missionType)
+		public static Payloads Payloads
 		{
-			var gvw = new[] { 7.5.SI().Ton.Cast<Kilogram>(), 16.SI().Ton.Cast<Kilogram>() };
-			var payload50 = new[] { 1.25.SI().Ton.Cast<Kilogram>(), 4.6.SI().Ton.Cast<Kilogram>() };
-			var payload75 = new[] { 1.9.SI().Ton.Cast<Kilogram>(), 6.9.SI().Ton.Cast<Kilogram>() };
-			var payload = missionType == MissionType.LongHaul ? payload75 : payload50;
-
-			return VectoMath.Interpolate(gvw[0], gvw[1], payload[0], payload[1], grossVehicleWeight);
+			get { return Instance()._payloads ?? (Instance()._payloads = new Payloads()); }
 		}
 
-		/// <summary>
-		/// Returns the payload for a trailer. This is 75% of (GVW-CurbWeight).
-		/// </summary>
-		public static Kilogram PayloadForTrailer(Kilogram grossVehicleWeight, Kilogram curbWeight)
+		public static ElectricSystem ElectricSystem
 		{
-			return (grossVehicleWeight - curbWeight) * 3 / 4;
+			get { return Instance()._electricSystem ?? (Instance()._electricSystem = new ElectricSystem()); }
 		}
 
 		public static Meter DynamicTyreRadius(string wheels, string rims)
@@ -123,6 +106,25 @@ namespace TUGraz.VectoCore.Models.Declaration
 			}
 		}
 
+		/// <summary>
+		/// Formula for calculating the payload for a given gross vehicle weight.
+		/// (so called "pc-formula", Whitebook Apr 2016, Part 1, p.187)
+		/// </summary>
+		public static Kilogram GetPayloadForGrossVehicleWeight(Kilogram grossVehicleWeight, MissionType missionType)
+		{
+			return missionType == MissionType.LongHaul
+				? Payloads.Lookup75Percent(grossVehicleWeight)
+				: Payloads.Lookup50Percent(grossVehicleWeight);
+		}
+
+		/// <summary>
+		/// Returns the payload for a trailer. This is 75% of (GVW-CurbWeight).
+		/// </summary>
+		public static Kilogram GetPayloadForTrailerWeight(Kilogram grossVehicleWeight, Kilogram curbWeight)
+		{
+			return Payloads.LookupTrailer(grossVehicleWeight, curbWeight);
+		}
+
 		public static Fan Fan
 		{
 			get { return Instance()._fan ?? (Instance()._fan = new Fan()); }
@@ -317,7 +319,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 				}
 
 				var gearRatio = gears[gear].Ratio / gears[gear + 1].Ratio;
-				var rpmMarginFactor = 1 + DeclarationData.Gearbox.ShiftPolygonRPMMargin / 100.0;
+				var rpmMarginFactor = 1 + ShiftPolygonRPMMargin / 100.0;
 
 				var p2p = new Point(p2.X * gearRatio * rpmMarginFactor, p2.Y / gearRatio);
 				var p3p = new Point(p3.X * gearRatio * rpmMarginFactor, p3.Y / gearRatio);
diff --git a/VectoCore/VectoCore/Models/Declaration/Segments.cs b/VectoCore/VectoCore/Models/Declaration/Segments.cs
index 128843bbe5..81045618de 100644
--- a/VectoCore/VectoCore/Models/Declaration/Segments.cs
+++ b/VectoCore/VectoCore/Models/Declaration/Segments.cs
@@ -36,6 +36,7 @@ using System.Linq;
 using TUGraz.VectoCommon.Exceptions;
 using TUGraz.VectoCommon.Models;
 using TUGraz.VectoCommon.Utils;
+using TUGraz.VectoCore.Configuration;
 using TUGraz.VectoCore.Utils;
 
 namespace TUGraz.VectoCore.Models.Declaration
@@ -102,26 +103,32 @@ namespace TUGraz.VectoCore.Models.Declaration
 			return segment;
 		}
 
-		//mk 2016-06-28 remove param curbWeight
 		private static Mission[] CreateMissions(ref Kilogram grossVehicleWeight, Kilogram curbWeight, DataRow row)
 		{
 			var missionTypes = Enum.GetValues(typeof(MissionType)).Cast<MissionType>();
 			var missions = new List<Mission>();
-			foreach (var missionType in missionTypes.Where(m => row.Field<string>(m.ToString()) == "1")) {
+			foreach (var missionType in missionTypes.Where(m => row.Field<string>(m.ToString()) != "-")) {
 				var body = DeclarationData.StandardWeights.Lookup(row.Field<string>("body"));
 
 				var trailer = ShouldTrailerBeUsed(row, missionType)
 					? DeclarationData.StandardWeights.Lookup(row.Field<string>("trailer"))
 					: DeclarationData.StandardWeights.Empty;
 
-				var gvw = VectoMath.Min(grossVehicleWeight + trailer.GrossVehicleWeight, DeclarationData.MaximumGrossVehicleWeight);
+				// limit gvw to MaxGVW (40t)
+				var gvw = VectoMath.Min(grossVehicleWeight + trailer.GrossVehicleWeight,
+					Constants.SimulationSettings.MaximumGrossVehicleWeight);
 				var maxLoad = gvw - curbWeight - body.CurbWeight - trailer.CurbWeight;
-				var refLoadValue =
-					row.Field<string>("payload-" + missionType.GetName()).Replace("+T", "").ToDouble(double.NaN);
-				var refLoad = VectoMath.Min(!double.IsNaN(refLoadValue)
-					? refLoadValue.SI<Kilogram>()
-					: DeclarationData.PayloadForGVW(grossVehicleWeight, missionType) +
-					DeclarationData.PayloadForTrailer(trailer.GrossVehicleWeight, trailer.CurbWeight), maxLoad);
+
+				var refLoadValue = row.Field<string>(missionType.ToString()).ToDouble(double.NaN);
+				Kilogram refLoad;
+				if (double.IsNaN(refLoadValue)) {
+					refLoad = DeclarationData.GetPayloadForGrossVehicleWeight(grossVehicleWeight, missionType) +
+							DeclarationData.GetPayloadForTrailerWeight(trailer.GrossVehicleWeight, trailer.CurbWeight);
+				} else {
+					refLoad = refLoadValue.SI<Kilogram>();
+				}
+
+				refLoad = VectoMath.Min(refLoad, maxLoad);
 
 				var mission = new Mission {
 					MissionType = missionType,
@@ -149,8 +156,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 		/// </summary>
 		private static bool ShouldTrailerBeUsed(DataRow row, MissionType missionType)
 		{
-			var payloadText = row.Field<string>("payload-" + missionType.GetName());
-			return payloadText.Contains("+T");
+			return !string.IsNullOrWhiteSpace(row.Field<string>("traileraxles" + GetMissionSuffix(missionType)));
 		}
 
 		private static double[] GetTrailerAxleWeightDistribution(DataRow row, MissionType missionType)
diff --git a/VectoCore/VectoCore/Models/Declaration/StandardWeights.cs b/VectoCore/VectoCore/Models/Declaration/StandardWeights.cs
index 97f8bd89b5..913391e98d 100644
--- a/VectoCore/VectoCore/Models/Declaration/StandardWeights.cs
+++ b/VectoCore/VectoCore/Models/Declaration/StandardWeights.cs
@@ -38,7 +38,7 @@ using TUGraz.VectoCore.Utils;
 
 namespace TUGraz.VectoCore.Models.Declaration
 {
-	public sealed class StandardWeight
+	internal sealed class StandardWeight
 	{
 		public Kilogram CurbWeight;
 		public Kilogram GrossVehicleWeight;
@@ -58,7 +58,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 	///		Gross Vehicle Weight (=Maximum Allowed Weight), and 
 	///		MaxPayload.
 	/// </summary>
-	public sealed class StandardWeights : LookupData<string, StandardWeight>
+	internal sealed class StandardWeights : LookupData<string, StandardWeight>
 	{
 		private const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.Body_Trailers_Weights.csv";
 
diff --git a/VectoCore/VectoCore/Resources/Declaration/SegmentTable.csv b/VectoCore/VectoCore/Resources/Declaration/SegmentTable.csv
index 35d9373906..8f88bdc8d5 100644
--- a/VectoCore/VectoCore/Resources/Declaration/SegmentTable.csv
+++ b/VectoCore/VectoCore/Resources/Declaration/SegmentTable.csv
@@ -1,30 +1,29 @@
-Valid,Vehicle Category,Axle Conf.,GVW_Min,GVW_Max,HDV class,Body,Trailer,Semitrailer,.vacc file,Cross Wind Correction - Long haul,Cross Wind Correction - Other,Truck Axles - Long haul  ,Truck Axles - Other,Trailer Axles - Long haul,Trailer Axles - Other,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach,Payload - Long haul    ,Payload - Regional delivery,Payload - Urban delivery,Payload - Municipal utility,Payload - Construction,Payload - Heavy Urban,Payload - Urban,Payload - Suburban,Payload - Interurban,Payload - Coach
-0    ,RigidTruck      ,4x2       ,0      ,7.5    ,0        ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,                   ,                         ,                     ,0        ,1                ,1             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-1    ,RigidTruck      ,4x2       ,7.5    ,10     ,1        ,B1  ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,45/55              ,                         ,                     ,0        ,1                ,1             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-1    ,Tractor         ,4x2       ,7.5    ,10     ,1        ,B1  ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,45/55              ,                         ,                     ,0        ,1                ,1             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-1    ,RigidTruck      ,4x2       ,10     ,12     ,2        ,B2  ,T1     ,           ,Truck.vacc,RigidSolo                        ,RigidSolo                    ,22.5/32.5                ,45/55              ,45/1                     ,                     ,1        ,1                ,1             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,+T                     ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-1    ,Tractor         ,4x2       ,10     ,12     ,2        ,B2  ,T1     ,           ,Truck.vacc,RigidSolo                        ,RigidSolo                    ,22.5/32.5                ,45/55              ,45/1                     ,                     ,1        ,1                ,1             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,+T                     ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-1    ,RigidTruck      ,4x2       ,12     ,16     ,3        ,B3  ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,40/60              ,                         ,                     ,0        ,1                ,1             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-1    ,Tractor         ,4x2       ,12     ,16     ,3        ,B3  ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,40/60              ,                         ,                     ,0        ,1                ,1             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-1    ,RigidTruck      ,4x2       ,16     ,99     ,4        ,B4  ,T2     ,           ,Truck.vacc,RigidTrailer                     ,RigidSolo                    ,20/30                    ,45/55              ,50/2                     ,                     ,1        ,1                ,0             ,1                ,0           ,0          ,0    ,0       ,0         ,0    ,14000+T                ,4400                       ,                        ,4400                       ,                      ,                     ,               ,                  ,                    ,               
-1    ,Tractor         ,4x2       ,16     ,99     ,5        ,    ,       ,ST1        ,Truck.vacc,TractorSemitrailer               ,TractorSemitrailer           ,20/25                    ,25/25              ,55/3                     ,50/3                 ,1        ,1                ,0             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,19300                  ,12900                      ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,RigidTruck      ,4x4       ,7.5    ,16     ,6        ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,1                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,RigidTruck      ,4x4       ,16     ,99     ,7        ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,Tractor         ,4x4       ,16     ,99     ,8        ,    ,       ,           ,Truck.vacc,                                 ,TractorSemitrailer           ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-1    ,RigidTruck      ,6x2       ,0      ,99     ,9        ,B5  ,T2     ,           ,Truck.vacc,RigidTrailer                     ,RigidSolo                    ,20/30/15                 ,35/40/25           ,35/2                     ,                     ,1        ,1                ,0             ,1                ,0           ,0          ,0    ,0       ,0         ,0    ,19300                  ,7100                       ,                        ,7100                       ,                      ,                     ,               ,                  ,                    ,               
-1    ,Tractor         ,6x2       ,0      ,99     ,10       ,    ,       ,ST1        ,Truck.vacc,TractorSemitrailer               ,TractorSemitrailer           ,15/10/20                 ,20/10/20           ,55/2                     ,50/2                 ,1        ,1                ,0             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,19300                  ,12900                      ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,RigidTruck      ,6x4       ,0      ,99     ,11       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,35/35/30           ,                         ,                     ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,7100                  ,                     ,               ,                  ,                    ,               
-0    ,Tractor         ,6x4       ,0      ,99     ,12       ,    ,       ,           ,Truck.vacc,                                 ,TractorSemitrailer           ,                         ,20/15/15           ,                         ,50/2                 ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,12900                 ,                     ,               ,                  ,                    ,               
-0    ,RigidTruck      ,6x6       ,0      ,99     ,13       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,Tractor         ,6x6       ,0      ,99     ,14       ,    ,       ,           ,Truck.vacc,                                 ,TractorSemitrailer           ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,RigidTruck      ,8x2       ,0      ,99     ,15       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,                   ,                         ,                     ,0        ,1                ,0             ,0                ,0           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,RigidTruck      ,8x4       ,0      ,99     ,16       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,12900                 ,                     ,               ,                  ,                    ,               
-0    ,RigidTruck      ,8x6       ,0      ,99     ,17       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,RigidTruck      ,8x8       ,0      ,99     ,17       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,1           ,0          ,0    ,0       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,CityBus         ,4x2       ,0      ,18     ,B1       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,0           ,1          ,1    ,1       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,InterurbanBus   ,4x2       ,0      ,18     ,B2       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,0           ,0          ,0    ,0       ,1         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,Coach           ,4x2       ,0      ,18     ,B3       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,0           ,0          ,0    ,0       ,0         ,1    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,CityBus         ,6x2       ,18     ,99     ,B4       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,0           ,1          ,1    ,1       ,0         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,InterurbanBus   ,6x2       ,18     ,99     ,B5       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,0           ,0          ,0    ,0       ,1         ,0    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-0    ,Coach           ,6x2       ,18     ,99     ,B6       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                         ,                   ,                         ,                     ,0        ,0                ,0             ,0                ,0           ,0          ,0    ,0       ,0         ,1    ,                       ,                           ,                        ,                           ,                      ,                     ,               ,                  ,                    ,               
-     
\ No newline at end of file
+Valid,Vehicle Category,Axle Conf.,GVW_Min,GVW_Max,HDV class,Body,Trailer,Semitrailer,.vacc file,Cross Wind Correction - Long haul,Cross Wind Correction - Other,Truck Axles - Long haul,Truck Axles - Other,Trailer Axles - Long haul,Trailer Axles - Other,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach
+0    ,RigidTruck      ,4x2       ,0      ,7.5    ,0        ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,                   ,                         ,                     ,-        ,pc(R)            ,pc(R)         ,-                ,-           ,-          ,-    ,-       ,-         ,-
+1    ,RigidTruck      ,4x2       ,7.5    ,10     ,1        ,B1  ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,45/55              ,                         ,                     ,-        ,pc(R)            ,pc(R)         ,-                ,-           ,-          ,-    ,-       ,-         ,-
+1    ,Tractor         ,4x2       ,7.5    ,10     ,1        ,B1  ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,45/55              ,                         ,                     ,-        ,pc(R)            ,pc(R)         ,-                ,-           ,-          ,-    ,-       ,-         ,-
+1    ,RigidTruck      ,4x2       ,10     ,12     ,2        ,B2  ,T1     ,           ,Truck.vacc,RigidTrailer                     ,RigidSolo                    ,22.5/32.5              ,45/55              ,45/1                     ,                     ,pc(R)    ,pc(R)            ,pc(R)         ,-                ,-           ,-          ,-    ,-       ,-         ,-
+1    ,Tractor         ,4x2       ,10     ,12     ,2        ,B2  ,T1     ,           ,Truck.vacc,RigidTrailer                     ,RigidSolo                    ,22.5/32.5              ,45/55              ,45/1                     ,                     ,pc(R)    ,pc(R)            ,pc(R)         ,-                ,-           ,-          ,-    ,-       ,-         ,-
+1    ,RigidTruck      ,4x2       ,12     ,16     ,3        ,B3  ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,40/60              ,                         ,                     ,-        ,pc(R)            ,pc(R)         ,-                ,-           ,-          ,-    ,-       ,-         ,-
+1    ,Tractor         ,4x2       ,12     ,16     ,3        ,B3  ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,40/60              ,                         ,                     ,-        ,pc(R)            ,pc(R)         ,-                ,-           ,-          ,-    ,-       ,-         ,-
+1    ,RigidTruck      ,4x2       ,16     ,99     ,4        ,B4  ,T2     ,           ,Truck.vacc,RigidTrailer                     ,RigidSolo                    ,20/30                  ,45/55              ,50/2                     ,                     ,14000    ,4400             ,-             ,4400             ,-           ,-          ,-    ,-       ,-         ,-
+1    ,Tractor         ,4x2       ,16     ,99     ,5        ,    ,       ,ST1        ,Truck.vacc,TractorSemitrailer               ,TractorSemitrailer           ,20/25                  ,25/25              ,55/3                     ,50/3                 ,19300    ,12900            ,-             ,-                ,-           ,-          ,-    ,-       ,-         ,-
+0    ,RigidTruck      ,4x4       ,7.5    ,16     ,6        ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,???              ,???         ,-          ,-    ,-       ,-         ,-
+0    ,RigidTruck      ,4x4       ,16     ,99     ,7        ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,???         ,-          ,-    ,-       ,-         ,-
+0    ,Tractor         ,4x4       ,16     ,99     ,8        ,    ,       ,           ,Truck.vacc,                                 ,TractorSemitrailer           ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,???         ,-          ,-    ,-       ,-         ,-
+1    ,RigidTruck      ,6x2       ,0      ,99     ,9        ,B5  ,T2     ,           ,Truck.vacc,RigidTrailer                     ,RigidSolo                    ,20/30/15               ,35/40/25           ,35/2                     ,                     ,19300    ,7100             ,-             ,7100             ,-           ,-          ,-    ,-       ,-         ,-
+1    ,Tractor         ,6x2       ,0      ,99     ,10       ,    ,       ,ST1        ,Truck.vacc,TractorSemitrailer               ,TractorSemitrailer           ,15/10/20               ,20/10/20           ,55/2                     ,50/2                 ,19300    ,12900            ,-             ,-                ,-           ,-          ,-    ,-       ,-         ,-
+0    ,RigidTruck      ,6x4       ,0      ,99     ,11       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,35/35/30           ,                         ,                     ,-        ,-                ,-             ,-                ,7100        ,-          ,-    ,-       ,-         ,-
+0    ,Tractor         ,6x4       ,0      ,99     ,12       ,    ,       ,           ,Truck.vacc,                                 ,TractorSemitrailer           ,                       ,20/15/15           ,                         ,50/2                 ,-        ,-                ,-             ,-                ,12900       ,-          ,-    ,-       ,-         ,-
+0    ,RigidTruck      ,6x6       ,0      ,99     ,13       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,???         ,-          ,-    ,-       ,-         ,-
+0    ,Tractor         ,6x6       ,0      ,99     ,14       ,    ,       ,           ,Truck.vacc,                                 ,TractorSemitrailer           ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,???         ,-          ,-    ,-       ,-         ,-
+0    ,RigidTruck      ,8x2       ,0      ,99     ,15       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,                   ,                         ,                     ,-        ,???              ,-             ,-                ,-           ,-          ,-    ,-       ,-         ,-
+0    ,RigidTruck      ,8x4       ,0      ,99     ,16       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,12900       ,-          ,-    ,-       ,-         ,-
+0    ,RigidTruck      ,8x6       ,0      ,99     ,17       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,???         ,-          ,-    ,-       ,-         ,-
+0    ,RigidTruck      ,8x8       ,0      ,99     ,17       ,    ,       ,           ,Truck.vacc,                                 ,RigidSolo                    ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,???         ,-          ,-    ,-       ,-         ,-
+0    ,CityBus         ,4x2       ,0      ,18     ,B1       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,-           ,???        ,???  ,???     ,-         ,-
+0    ,InterurbanBus   ,4x2       ,0      ,18     ,B2       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,-           ,-          ,-    ,-       ,???       ,-
+0    ,Coach           ,4x2       ,0      ,18     ,B3       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,-           ,-          ,-    ,-       ,-         ,???
+0    ,CityBus         ,6x2       ,18     ,99     ,B4       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,-           ,???        ,???  ,???     ,-         ,-
+0    ,InterurbanBus   ,6x2       ,18     ,99     ,B5       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,-           ,-          ,-    ,-       ,???       ,-
+0    ,Coach           ,6x2       ,18     ,99     ,B6       ,    ,       ,           ,          ,                                 ,CoachBus                     ,                       ,                   ,                         ,                     ,-        ,-                ,-             ,-                ,-           ,-          ,-    ,-       ,-         ,???
\ No newline at end of file
diff --git a/VectoCore/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs b/VectoCore/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs
index 172df459ca..1d7d580504 100644
--- a/VectoCore/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs
+++ b/VectoCore/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs
@@ -456,7 +456,8 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
 				DriverBehavior = DrivingBehavior.Driving,
 				Altitude = 0.SI<Meter>(),
 				VehicleMass = 10000.SI<Kilogram>(),
-				ReducedMassWheels = 100.SI<Kilogram>()
+				ReducedMassWheels = 100.SI<Kilogram>(),
+				TotalMass = 19000.SI<Kilogram>()
 			};
 			var gearboxData = MockSimulationDataFactory.CreateGearboxDataFromFile(GearboxDataFile, EngineDataFile);
 			var gearbox = new Gearbox(container, gearboxData, new AMTShiftStrategy(gearboxData, container));
-- 
GitLab