From 954719f4b5479f7795549640ed204e2f2486d52d Mon Sep 17 00:00:00 2001
From: "VKMTHD\\franzjosefkober" <franz.josef.kober@ivt.tugraz.at>
Date: Fri, 19 Mar 2021 19:08:15 +0100
Subject: [PATCH] make enum and bool properties of multistage vehicle input
 data optional

---
 VECTO/GUI/VehicleForm.vb                      |    4 +-
 VECTO/Input Files/Engine.vb                   | 1284 ++++++++---------
 VECTO/Input Files/Gearbox.vb                  |   12 +-
 VECTO/Input Files/MockVehicleInputData.vb     |   12 +-
 VECTO/Input Files/Vehicle.vb                  |   12 +-
 .../IPneumaticUserInputsConfig.cs             |    8 +-
 .../InputData/DeclarationInputData.cs         |   12 +-
 .../VectoCommon/Models/LegislativeClass.cs    |    4 +-
 .../VectoCommon/Models/RegistrationClass.cs   |   27 +-
 VectoCommon/VectoCommon/Models/VehicleCode.cs |    8 +-
 .../FileIO/JSON/JSONComponentInputData.cs     |   14 +-
 .../InputData/FileIO/JSON/JSONVehicleData.cs  |   40 +-
 .../XMLDeclarationVehicleDataProvider.cs      |  214 ++-
 .../XMLEngineeringVehicleDataProvider.cs      |   14 +-
 .../DeclarationDataAdapterPrimaryBus.cs       |    4 +-
 .../Pneumatics/PneumaticUserInputsConfig.cs   |    2 +-
 .../Declaration/CompletedBusSegments.cs       |    8 +-
 .../Models/Declaration/DeclarationData.cs     |   10 +-
 .../VectoCore/Models/Declaration/Mission.cs   |    2 +-
 .../SimulationComponent/Data/VehicleData.cs   |    6 +-
 .../VectoCore/OutputData/XML/XMLVTPReport.cs  |    2 +-
 .../Utils/MockDeclarationVehicleInputData.cs  |   24 +-
 .../XML/XMLMultistageBusDataTest.cs           |   28 +-
 23 files changed, 935 insertions(+), 816 deletions(-)

diff --git a/VECTO/GUI/VehicleForm.vb b/VECTO/GUI/VehicleForm.vb
index 2fc3a0bf9c..26ab656ab5 100644
--- a/VECTO/GUI/VehicleForm.vb
+++ b/VECTO/GUI/VehicleForm.vb
@@ -131,8 +131,8 @@ Public Class VehicleForm
 
 		cbLegislativeClass.ValueMember = "Value"
 		cbLegislativeClass.DisplayMember = "Label"
-		cbLegislativeClass.DataSource = [Enum].GetValues(GetType(LegislativeClass)) _
-			.Cast(Of LegislativeClass).Select(Function(x) New With {Key .Value = x, .Label = x.GetLabel()}).Tolist()
+		cbLegislativeClass.DataSource = [Enum].GetValues(GetType(LegislativeClass?)) _
+			.Cast(Of LegislativeClass?).Select(Function(x) New With {Key .Value = x, .Label = x.GetLabel()}).ToList()
 		'Items.AddRange(PtoTypeStrings.Values.Cast(Of Object).ToArray())
 
 		_changed = False
diff --git a/VECTO/Input Files/Engine.vb b/VECTO/Input Files/Engine.vb
index 0658148a33..9dba717bc0 100644
--- a/VECTO/Input Files/Engine.vb	
+++ b/VECTO/Input Files/Engine.vb	
@@ -32,385 +32,385 @@ Imports TUGraz.VectoCore.Utils
 ''' <remarks></remarks>
 <CustomValidation(GetType(Engine), "ValidateEngine")>
 Public Class Engine
-    Implements IEngineEngineeringInputData, IEngineDeclarationInputData, IEngineModeDeclarationInputData, IEngineModeEngineeringInputData
+	Implements IEngineEngineeringInputData, IEngineDeclarationInputData, IEngineModeDeclarationInputData, IEngineModeEngineeringInputData
 
-    ''' <summary>
-    ''' Current format version
-    ''' </summary>
-    ''' <remarks></remarks>
-    Private Const FormatVersion As Short = 3
+	''' <summary>
+	''' Current format version
+	''' </summary>
+	''' <remarks></remarks>
+	Private Const FormatVersion As Short = 3
 
-    ''' <summary>
-    ''' Engine description (model, type, etc.). Saved in input file.
-    ''' </summary>
-    ''' <remarks></remarks>
-    Public ModelName As String
+	''' <summary>
+	''' Engine description (model, type, etc.). Saved in input file.
+	''' </summary>
+	''' <remarks></remarks>
+	Public ModelName As String
 
-    ''' <summary>
-    ''' Engine displacement [ccm]. Saved in input file.
-    ''' </summary>
-    ''' <remarks></remarks>
-    Public Displacement As Double
+	''' <summary>
+	''' Engine displacement [ccm]. Saved in input file.
+	''' </summary>
+	''' <remarks></remarks>
+	Public Displacement As Double
 
-    ''' <summary>
-    ''' Idling speed [1/min]. Saved in input file.
-    ''' </summary>
-    ''' <remarks></remarks>
-    Public IdleSpeed As Double
+	''' <summary>
+	''' Idling speed [1/min]. Saved in input file.
+	''' </summary>
+	''' <remarks></remarks>
+	Public IdleSpeed As Double
+
+	''' <summary>
+	''' Rotational inertia including flywheel [kgm²]. Saved in input file. Overwritten by generic value in Declaration mode.
+	''' </summary>
+	''' <remarks></remarks>
+	Public EngineInertia As Double
+
+	''' <summary>
+	''' List of full load/motoring curve files (.vfld)
+	''' </summary>
+	''' <remarks></remarks>
+	Private ReadOnly _fullLoadCurvePath As SubPath
+
+
+
+	''' <summary>
+	''' Directory of engine file. Defined in FilePath property (Set)
+	''' </summary>
+	''' <remarks></remarks>
+	Friend _myPath As String
+
+	''' <summary>
+	''' Full file path. Needs to be defined via FilePath property before calling ReadFile or SaveFile.
+	''' </summary>
+	''' <remarks></remarks>
+	Private _filePath As String
+
+
+
+	Public ratedPowerInput As Watt
+	Public ratedSpeedInput As PerSecond
+	Public maxTorqueInput As NewtonMeter
+
+	Public WHRTypeInput As WHRType
+
+
+	Public PrimaryEngineFuel As EngineFuel
+	Public SecondaryEngineFuel As EngineFuel
+
+	Public ElectricalWHRData As WHRData
+	Public MechanicalWHRData As WHRData
+
+	Public DualFuelInput As Boolean
+
+
+	''' <summary>
+	''' New instance. Initialise
+	''' </summary>
+	''' <remarks></remarks>
+	Public Sub New()
+		_myPath = ""
+		_filePath = ""
+
+		_fullLoadCurvePath = New SubPath
+
+		PrimaryEngineFuel = New EngineFuel(Me)
+		SecondaryEngineFuel = New EngineFuel(Me)
+		SetDefault()
+	End Sub
+
+	''' <summary>
+	''' Set default values
+	''' </summary>
+	''' <remarks></remarks>
+	Private Sub SetDefault()
+		ModelName = "Undefined"
+		Displacement = 0
+		IdleSpeed = 0
+		EngineInertia = 0
+
+
+		_fullLoadCurvePath.Clear()
+
+	End Sub
+
+	''' <summary>
+	''' </summary>
+	''' <returns>True if successful.</returns>
+	''' <remarks></remarks>
+	Public Function SaveFile() As Boolean
+
+		Dim validationResults As IList(Of ValidationResult) =
+				Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), VectoSimulationJobType.ConventionalVehicle, Nothing, Nothing, False)
+
+		If validationResults.Count > 0 Then
+			Dim messages As IEnumerable(Of String) =
+					validationResults.Select(Function(r) r.ErrorMessage + String.Join(", ", r.MemberNames.Distinct()))
+			MsgBox("Invalid input." + Environment.NewLine + String.Join(Environment.NewLine, messages), MsgBoxStyle.OkOnly,
+					"Failed to save engine")
+			Return False
+		End If
+
+		Try
+			Dim writer As JSONFileWriter = New JSONFileWriter()
+			writer.SaveEngine(Me, _filePath, Cfg.DeclMode)
+
+		Catch ex As Exception
+			MsgBox("Faled to write Engine file: " + ex.Message)
+			Return False
+		End Try
+		Return True
+	End Function
+
+
+	''' <summary>
+	''' </summary>
+	''' <value></value>
+	''' <returns>Full filepath</returns>
+	''' <remarks></remarks>
+	Public Property FilePath() As String
+		Get
+			Return _filePath
+		End Get
+		Set(ByVal value As String)
+			_filePath = value
+			If _filePath = "" Then
+				_myPath = ""
+			Else
+				_myPath = Path.GetDirectoryName(_filePath) & "\"
+			End If
+		End Set
+	End Property
+
+
+	Public Property PathFld(Optional ByVal original As Boolean = False) As String
+		Get
+			If original Then
+				Return _fullLoadCurvePath.OriginalPath
+			Else
+				Return _fullLoadCurvePath.FullPath
+			End If
+		End Get
+		Set(ByVal value As String)
+			_fullLoadCurvePath.Init(_myPath, value)
+		End Set
+	End Property
 
-    ''' <summary>
-    ''' Rotational inertia including flywheel [kgm²]. Saved in input file. Overwritten by generic value in Declaration mode.
-    ''' </summary>
-    ''' <remarks></remarks>
-    Public EngineInertia As Double
 
-    ''' <summary>
-    ''' List of full load/motoring curve files (.vfld)
-    ''' </summary>
-    ''' <remarks></remarks>
-    Private ReadOnly _fullLoadCurvePath As SubPath
-
-
-
-    ''' <summary>
-    ''' Directory of engine file. Defined in FilePath property (Set)
-    ''' </summary>
-    ''' <remarks></remarks>
-    Friend _myPath As String
-
-    ''' <summary>
-    ''' Full file path. Needs to be defined via FilePath property before calling ReadFile or SaveFile.
-    ''' </summary>
-    ''' <remarks></remarks>
-    Private _filePath As String
-
-
-
-    Public ratedPowerInput As Watt
-    Public ratedSpeedInput As PerSecond
-    Public maxTorqueInput As NewtonMeter
-
-    Public WHRTypeInput As WHRType
-
-
-    Public PrimaryEngineFuel As EngineFuel
-    Public SecondaryEngineFuel As EngineFuel
-
-    Public ElectricalWHRData As WHRData
-    Public MechanicalWHRData As WHRData
-
-    Public DualFuelInput As Boolean
-
-
-    ''' <summary>
-    ''' New instance. Initialise
-    ''' </summary>
-    ''' <remarks></remarks>
-    Public Sub New()
-        _myPath = ""
-        _filePath = ""
-
-        _fullLoadCurvePath = New SubPath
-
-        PrimaryEngineFuel = New EngineFuel(Me)
-        SecondaryEngineFuel = New EngineFuel(Me)
-        SetDefault()
-    End Sub
-
-    ''' <summary>
-    ''' Set default values
-    ''' </summary>
-    ''' <remarks></remarks>
-    Private Sub SetDefault()
-        ModelName = "Undefined"
-        Displacement = 0
-        IdleSpeed = 0
-        EngineInertia = 0
-
-
-        _fullLoadCurvePath.Clear()
-
-    End Sub
-
-    ''' <summary>
-    ''' </summary>
-    ''' <returns>True if successful.</returns>
-    ''' <remarks></remarks>
-    Public Function SaveFile() As Boolean
-
-        Dim validationResults As IList(Of ValidationResult) =
-                Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), VectoSimulationJobType.ConventionalVehicle, Nothing, Nothing, False)
-
-        If validationResults.Count > 0 Then
-            Dim messages As IEnumerable(Of String) =
-                    validationResults.Select(Function(r) r.ErrorMessage + String.Join(", ", r.MemberNames.Distinct()))
-            MsgBox("Invalid input." + Environment.NewLine + String.Join(Environment.NewLine, messages), MsgBoxStyle.OkOnly,
-                    "Failed to save engine")
-            Return False
-        End If
-
-        Try
-            Dim writer As JSONFileWriter = New JSONFileWriter()
-            writer.SaveEngine(Me, _filePath, Cfg.DeclMode)
-
-        Catch ex As Exception
-            MsgBox("Faled to write Engine file: " + ex.Message)
-            Return False
-        End Try
-        Return True
-    End Function
-
-
-    ''' <summary>
-    ''' </summary>
-    ''' <value></value>
-    ''' <returns>Full filepath</returns>
-    ''' <remarks></remarks>
-    Public Property FilePath() As String
-        Get
-            Return _filePath
-        End Get
-        Set(ByVal value As String)
-            _filePath = value
-            If _filePath = "" Then
-                _myPath = ""
-            Else
-                _myPath = Path.GetDirectoryName(_filePath) & "\"
-            End If
-        End Set
-    End Property
-
-
-    Public Property PathFld(Optional ByVal original As Boolean = False) As String
-        Get
-            If original Then
-                Return _fullLoadCurvePath.OriginalPath
-            Else
-                Return _fullLoadCurvePath.FullPath
-            End If
-        End Get
-        Set(ByVal value As String)
-            _fullLoadCurvePath.Init(_myPath, value)
-        End Set
-    End Property
-
-
-
-
-    ' ReSharper disable once UnusedMember.Global  -- used for Validation
-    Public Shared Function ValidateEngine(engine As Engine, validationContext As ValidationContext) As ValidationResult
-        Dim engineData As CombustionEngineData
-
-
-        Dim modeService As VectoValidationModeServiceContainer =
-                TryCast(validationContext.GetService(GetType(VectoValidationModeServiceContainer)),
-                        VectoValidationModeServiceContainer)
-        Dim mode As ExecutionMode = If(modeService Is Nothing, ExecutionMode.Declaration, modeService.Mode)
-        Dim emsCycle As Boolean = (modeService IsNot Nothing) AndAlso modeService.IsEMSCycle
-        Dim gbxType As GearboxType? = If(modeService Is Nothing, GearboxType.MT, modeService.GearboxType)
-        Dim jobType as VectoSimulationJobType = If(modeService Is Nothing, VectoSimulationJobType.ConventionalVehicle, modeService.JobType)
-        Dim emPos as PowertrainPosition? = If(modeService Is Nothing, PowertrainPosition.HybridPositionNotSet, modeService.EMPowertrainPosition)
-
-        Try
-            If mode = ExecutionMode.Declaration Then
-                Dim doa As DeclarationDataAdapterHeavyLorry = New DeclarationDataAdapterHeavyLorry()
-                Dim dummyGearboxData As IGearboxDeclarationInputData = New Gearbox() With {
-                        .Type = GearboxType.AMT,
-                        .MaxTorque = New List(Of String),
-                        .GearRatios = New List(Of Double)()
-                        }
-                Dim dummyVehicle As IVehicleDeclarationInputData = New DummyVehicle() With {
-                    .GearboxInputData = dummyGearboxData,
-                    .EngineInputData = engine,
-                    .TankSystem = TankSystem.Compressed
-                }
-                engineData = doa.CreateEngineData(dummyVehicle, engine.EngineModes.First(), New Mission() With {.MissionType = MissionType.LongHaul})
-            Else
-                Dim doa As EngineeringDataAdapter = New EngineeringDataAdapter()
-                Dim dummyVehicle As IVehicleEngineeringInputData = New DummyVehicle() With {
-                        .IVehicleComponentsEngineering_EngineInputData = engine
-                        }
-                engineData = doa.CreateEngineData(dummyVehicle, CType(engine.EngineModes.First(), IEngineModeEngineeringInputData))
-            End If
-
-            Dim result As IList(Of ValidationResult) =
-                    engineData.Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), jobType, emPos, gbxType, emsCycle)
-
-            If Not result.Any() Then Return ValidationResult.Success
-
-            Return New ValidationResult("Engine Configuration is invalid. ",
-                                        result.Select(Function(r) r.ErrorMessage + String.Join(Environment.NewLine, r.MemberNames)).ToList())
-        Catch ex As Exception
-            Return New ValidationResult(ex.Message)
-        End Try
-    End Function
+
+
+	' ReSharper disable once UnusedMember.Global  -- used for Validation
+	Public Shared Function ValidateEngine(engine As Engine, validationContext As ValidationContext) As ValidationResult
+		Dim engineData As CombustionEngineData
+
+
+		Dim modeService As VectoValidationModeServiceContainer =
+				TryCast(validationContext.GetService(GetType(VectoValidationModeServiceContainer)),
+						VectoValidationModeServiceContainer)
+		Dim mode As ExecutionMode = If(modeService Is Nothing, ExecutionMode.Declaration, modeService.Mode)
+		Dim emsCycle As Boolean = (modeService IsNot Nothing) AndAlso modeService.IsEMSCycle
+		Dim gbxType As GearboxType? = If(modeService Is Nothing, GearboxType.MT, modeService.GearboxType)
+		Dim jobType As VectoSimulationJobType = If(modeService Is Nothing, VectoSimulationJobType.ConventionalVehicle, modeService.JobType)
+		Dim emPos As PowertrainPosition? = If(modeService Is Nothing, PowertrainPosition.HybridPositionNotSet, modeService.EMPowertrainPosition)
+
+		Try
+			If mode = ExecutionMode.Declaration Then
+				Dim doa As DeclarationDataAdapterHeavyLorry = New DeclarationDataAdapterHeavyLorry()
+				Dim dummyGearboxData As IGearboxDeclarationInputData = New Gearbox() With {
+						.Type = GearboxType.AMT,
+						.MaxTorque = New List(Of String),
+						.GearRatios = New List(Of Double)()
+						}
+				Dim dummyVehicle As IVehicleDeclarationInputData = New DummyVehicle() With {
+					.GearboxInputData = dummyGearboxData,
+					.EngineInputData = engine,
+					.TankSystem = TankSystem.Compressed
+				}
+				engineData = doa.CreateEngineData(dummyVehicle, engine.EngineModes.First(), New Mission() With {.MissionType = MissionType.LongHaul})
+			Else
+				Dim doa As EngineeringDataAdapter = New EngineeringDataAdapter()
+				Dim dummyVehicle As IVehicleEngineeringInputData = New DummyVehicle() With {
+						.IVehicleComponentsEngineering_EngineInputData = engine
+						}
+				engineData = doa.CreateEngineData(dummyVehicle, CType(engine.EngineModes.First(), IEngineModeEngineeringInputData))
+			End If
+
+			Dim result As IList(Of ValidationResult) =
+					engineData.Validate(If(Cfg.DeclMode, ExecutionMode.Declaration, ExecutionMode.Engineering), jobType, emPos, gbxType, emsCycle)
+
+			If Not result.Any() Then Return ValidationResult.Success
+
+			Return New ValidationResult("Engine Configuration is invalid. ",
+										result.Select(Function(r) r.ErrorMessage + String.Join(Environment.NewLine, r.MemberNames)).ToList())
+		Catch ex As Exception
+			Return New ValidationResult(ex.Message)
+		End Try
+	End Function
 
 #Region "IInputData"
 
-    Public ReadOnly Property DataSource As DataSource Implements IComponentInputData.DataSource
-        Get
-            Dim retVal As DataSource = New DataSource()
-            retVal.SourceType = DataSourceType.JSONFile
-            retVal.SourceFile = FilePath
-            Return retVal
-        End Get
-    End Property
-
-
-    Public ReadOnly Property SavedInDeclarationMode As Boolean Implements IComponentInputData.SavedInDeclarationMode
-        Get
-            Return Cfg.DeclMode
-        End Get
-    End Property
-
-    Public ReadOnly Property Manufacturer As String Implements IComponentInputData.Manufacturer
-        Get
-            ' Just for the interface. Value is not available in GUI yet.
-            Return TUGraz.VectoCore.Configuration.Constants.NOT_AVailABLE
-        End Get
-    End Property
-
-    Public ReadOnly Property [Date] As DateTime Implements IComponentInputData.[Date]
-        Get
-            Return Now.ToUniversalTime()
-        End Get
-    End Property
-
-    Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion
-        Get
-            Return "VECTO-GUI"
-        End Get
-    End Property
-
-    Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod
-        Get
-            Return CertificationMethod.NotCertified
-        End Get
-    End Property
-
-    Public ReadOnly Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
-        Get
-            ' Just for the interface. Value is not available in GUI yet.
-            Return TUGraz.VectoCore.Configuration.Constants.NOT_AVailABLE
-        End Get
-    End Property
-
-    Public ReadOnly Property DigestValue As DigestData Implements IComponentInputData.DigestValue
-        Get
-            Return Nothing
-        End Get
-    End Property
-
-    Public ReadOnly Property Model As String Implements IComponentInputData.Model
-        Get
-            Return ModelName
-        End Get
-    End Property
-
-    Public ReadOnly Property IEngineDeclarationInputData_Displacement As CubicMeter _
-        Implements IEngineDeclarationInputData.Displacement
-        Get
-            Return (Displacement / 1000.0 / 1000.0).SI(Of CubicMeter)()
-        End Get
-    End Property
-
-    Public ReadOnly Property IEngineModeDeclarationInputData_IdleSpeed As PerSecond _
-        Implements IEngineModeDeclarationInputData.IdleSpeed
-        Get
-            Return IdleSpeed.RPMtoRad()
-        End Get
-    End Property
-
-
-
-    Public ReadOnly Property FullLoadCurve As TableData Implements IEngineModeDeclarationInputData.FullLoadCurve
-        Get
-            If Not File.Exists(_fullLoadCurvePath.FullPath) Then _
-                Throw New VectoException("Full-Load Curve is missing or invalid")
-            Return VectoCSVFile.Read(_fullLoadCurvePath.FullPath)
-        End Get
-    End Property
-
-    Public ReadOnly Property IEngineModeEngineeringInputData_Fuels As IList(Of IEngineFuelEngineeringInputData) Implements IEngineModeEngineeringInputData.Fuels
-        Get
-            Dim retval As List(Of IEngineFuelEngineeringInputData) = New List(Of IEngineFuelEngineeringInputData)({PrimaryEngineFuel})
-            If (DualFuelInput) Then
-                retval.Add(SecondaryEngineFuel)
-            End If
-            Return retval
-        End Get
-    End Property
-
-    Public ReadOnly Property Fuels As IList(Of IEngineFuelDelcarationInputData) Implements IEngineModeDeclarationInputData.Fuels
-        Get
-            Dim retval As List(Of IEngineFuelDelcarationInputData) = New List(Of IEngineFuelDelcarationInputData)({PrimaryEngineFuel})
-            If (DualFuelInput) Then
-                retval.Add(SecondaryEngineFuel)
-            End If
-            Return retval
-        End Get
-    End Property
-
-    Public ReadOnly Property WasteHeatRecoveryDataElectrical As IWHRData Implements IEngineModeDeclarationInputData.WasteHeatRecoveryDataElectrical
-        Get
-            Return ElectricalWHRData
-        End Get
-    End Property
-
-    Public ReadOnly Property WasteHeatRecoveryDataMechanical As IWHRData Implements IEngineModeDeclarationInputData.WasteHeatRecoveryDataMechanical
-        Get
-            Return MechanicalWHRData
-        End Get
-    End Property
-
-    Public ReadOnly Property RatedPowerDeclared As Watt Implements IEngineDeclarationInputData.RatedPowerDeclared
-        Get
-            Return ratedPowerInput
-        End Get
-    End Property
-
-    Public ReadOnly Property RatedSpeedDeclared As PerSecond Implements IEngineDeclarationInputData.RatedSpeedDeclared
-        Get
-            Return ratedSpeedInput
-        End Get
-    End Property
-
-    Public ReadOnly Property MaxTorqueDeclared As NewtonMeter Implements IEngineDeclarationInputData.MaxTorqueDeclared
-        Get
-            Return maxTorqueInput
-        End Get
-    End Property
-
-    Public ReadOnly Property IEngineEngineeringInputData_EngineModes As IList(Of IEngineModeEngineeringInputData) Implements IEngineEngineeringInputData.EngineModes
-        Get
-            Return New List(Of IEngineModeEngineeringInputData)({Me})
-        End Get
-    End Property
-
-    Public ReadOnly Property EngineModes As IList(Of IEngineModeDeclarationInputData) Implements IEngineDeclarationInputData.EngineModes
-        Get
-            Return New List(Of IEngineModeDeclarationInputData)({Me})
-        End Get
-    End Property
-
-    Public ReadOnly Property WHRType As WHRType Implements IEngineDeclarationInputData.WHRType
-        Get
-            Return WHRTypeInput
-        End Get
-    End Property
-
-    Public ReadOnly Property Inertia As KilogramSquareMeter Implements IEngineEngineeringInputData.Inertia
-        Get
-            Return EngineInertia.SI(Of KilogramSquareMeter)()
-        End Get
-    End Property
-
-
-    Public ReadOnly Property EngineStartTime As Second Implements IEngineEngineeringInputData.EngineStartTime
-        Get
-            Return Nothing
-        End Get
-    End Property
+	Public ReadOnly Property DataSource As DataSource Implements IComponentInputData.DataSource
+		Get
+			Dim retVal As DataSource = New DataSource()
+			retVal.SourceType = DataSourceType.JSONFile
+			retVal.SourceFile = FilePath
+			Return retVal
+		End Get
+	End Property
+
+
+	Public ReadOnly Property SavedInDeclarationMode As Boolean Implements IComponentInputData.SavedInDeclarationMode
+		Get
+			Return Cfg.DeclMode
+		End Get
+	End Property
+
+	Public ReadOnly Property Manufacturer As String Implements IComponentInputData.Manufacturer
+		Get
+			' Just for the interface. Value is not available in GUI yet.
+			Return TUGraz.VectoCore.Configuration.Constants.NOT_AVailABLE
+		End Get
+	End Property
+
+	Public ReadOnly Property [Date] As DateTime Implements IComponentInputData.[Date]
+		Get
+			Return Now.ToUniversalTime()
+		End Get
+	End Property
+
+	Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion
+		Get
+			Return "VECTO-GUI"
+		End Get
+	End Property
+
+	Public ReadOnly Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod
+		Get
+			Return CertificationMethod.NotCertified
+		End Get
+	End Property
+
+	Public ReadOnly Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
+		Get
+			' Just for the interface. Value is not available in GUI yet.
+			Return TUGraz.VectoCore.Configuration.Constants.NOT_AVailABLE
+		End Get
+	End Property
+
+	Public ReadOnly Property DigestValue As DigestData Implements IComponentInputData.DigestValue
+		Get
+			Return Nothing
+		End Get
+	End Property
+
+	Public ReadOnly Property Model As String Implements IComponentInputData.Model
+		Get
+			Return ModelName
+		End Get
+	End Property
+
+	Public ReadOnly Property IEngineDeclarationInputData_Displacement As CubicMeter _
+		Implements IEngineDeclarationInputData.Displacement
+		Get
+			Return (Displacement / 1000.0 / 1000.0).SI(Of CubicMeter)()
+		End Get
+	End Property
+
+	Public ReadOnly Property IEngineModeDeclarationInputData_IdleSpeed As PerSecond _
+		Implements IEngineModeDeclarationInputData.IdleSpeed
+		Get
+			Return IdleSpeed.RPMtoRad()
+		End Get
+	End Property
+
+
+
+	Public ReadOnly Property FullLoadCurve As TableData Implements IEngineModeDeclarationInputData.FullLoadCurve
+		Get
+			If Not File.Exists(_fullLoadCurvePath.FullPath) Then _
+				Throw New VectoException("Full-Load Curve is missing or invalid")
+			Return VectoCSVFile.Read(_fullLoadCurvePath.FullPath)
+		End Get
+	End Property
+
+	Public ReadOnly Property IEngineModeEngineeringInputData_Fuels As IList(Of IEngineFuelEngineeringInputData) Implements IEngineModeEngineeringInputData.Fuels
+		Get
+			Dim retval As List(Of IEngineFuelEngineeringInputData) = New List(Of IEngineFuelEngineeringInputData)({PrimaryEngineFuel})
+			If (DualFuelInput) Then
+				retval.Add(SecondaryEngineFuel)
+			End If
+			Return retval
+		End Get
+	End Property
+
+	Public ReadOnly Property Fuels As IList(Of IEngineFuelDelcarationInputData) Implements IEngineModeDeclarationInputData.Fuels
+		Get
+			Dim retval As List(Of IEngineFuelDelcarationInputData) = New List(Of IEngineFuelDelcarationInputData)({PrimaryEngineFuel})
+			If (DualFuelInput) Then
+				retval.Add(SecondaryEngineFuel)
+			End If
+			Return retval
+		End Get
+	End Property
+
+	Public ReadOnly Property WasteHeatRecoveryDataElectrical As IWHRData Implements IEngineModeDeclarationInputData.WasteHeatRecoveryDataElectrical
+		Get
+			Return ElectricalWHRData
+		End Get
+	End Property
+
+	Public ReadOnly Property WasteHeatRecoveryDataMechanical As IWHRData Implements IEngineModeDeclarationInputData.WasteHeatRecoveryDataMechanical
+		Get
+			Return MechanicalWHRData
+		End Get
+	End Property
+
+	Public ReadOnly Property RatedPowerDeclared As Watt Implements IEngineDeclarationInputData.RatedPowerDeclared
+		Get
+			Return ratedPowerInput
+		End Get
+	End Property
+
+	Public ReadOnly Property RatedSpeedDeclared As PerSecond Implements IEngineDeclarationInputData.RatedSpeedDeclared
+		Get
+			Return ratedSpeedInput
+		End Get
+	End Property
+
+	Public ReadOnly Property MaxTorqueDeclared As NewtonMeter Implements IEngineDeclarationInputData.MaxTorqueDeclared
+		Get
+			Return maxTorqueInput
+		End Get
+	End Property
+
+	Public ReadOnly Property IEngineEngineeringInputData_EngineModes As IList(Of IEngineModeEngineeringInputData) Implements IEngineEngineeringInputData.EngineModes
+		Get
+			Return New List(Of IEngineModeEngineeringInputData)({Me})
+		End Get
+	End Property
+
+	Public ReadOnly Property EngineModes As IList(Of IEngineModeDeclarationInputData) Implements IEngineDeclarationInputData.EngineModes
+		Get
+			Return New List(Of IEngineModeDeclarationInputData)({Me})
+		End Get
+	End Property
+
+	Public ReadOnly Property WHRType As WHRType Implements IEngineDeclarationInputData.WHRType
+		Get
+			Return WHRTypeInput
+		End Get
+	End Property
+
+	Public ReadOnly Property Inertia As KilogramSquareMeter Implements IEngineEngineeringInputData.Inertia
+		Get
+			Return EngineInertia.SI(Of KilogramSquareMeter)()
+		End Get
+	End Property
+
+
+	Public ReadOnly Property EngineStartTime As Second Implements IEngineEngineeringInputData.EngineStartTime
+		Get
+			Return Nothing
+		End Get
+	End Property
 
 #End Region
 
@@ -419,288 +419,288 @@ End Class
 
 Public Class WHRData
 
-    Implements IWHRData
-
-    Public WHRUrbanInput as Double
-    public WHRRuralInput As Double
-    public WHRMotorwayInput As Double
-    public WHRColdHotInput As Double
-    public WHRRegPerInput As Double
-    public WHREngineeringInput As Double
-
-    protected EngineData As Engine
-
-    public Sub New(engineDatar As Engine)
-        EngineData = engineDatar
-    End Sub
-
-    Public ReadOnly Property UrbanCorrectionFactor As Double Implements IWHRData.UrbanCorrectionFactor
-        Get
-            Return WHRUrbanInput
-        End Get
-    End Property
-    Public ReadOnly Property RuralCorrectionFactor As Double Implements IWHRData.RuralCorrectionFactor
-        Get
-            Return WHRRuralInput
-        End Get
-    End Property
-    Public ReadOnly Property MotorwayCorrectionFactor As Double Implements IWHRData.MotorwayCorrectionFactor
-        get
-            Return WHRMotorwayInput
-        End Get
-    End Property
-    Public ReadOnly Property BFColdHot As Double Implements IWHRData.BFColdHot
-        Get
-            Return WHRColdHotInput
-        End Get
-    End Property
-    Public ReadOnly Property CFRegPer As Double Implements IWHRData.CFRegPer
-        get
-            Return WHRRegPerInput
-        End Get
-    End Property
-
-    Public ReadOnly Property EngineeringCorrectionFactor As Double Implements IWHRData.EngineeringCorrectionFactor
-        Get
-            Return WHREngineeringInput
-        End Get
-    End Property
-
-    Public ReadOnly Property GeneratedPower As TableData Implements IWHRData.GeneratedPower
-        get
-            If Not File.Exists(EngineData.PrimaryEngineFuel._fuelConsumptionMapPath.FullPath) Then _
-                Throw New VectoException("FuelConsumptionMap is missing or invalid")
-            Return VectoCSVFile.Read(EngineData.PrimaryEngineFuel._fuelConsumptionMapPath.FullPath)
-        End Get
-    End Property
+	Implements IWHRData
+
+	Public WHRUrbanInput As Double
+	Public WHRRuralInput As Double
+	Public WHRMotorwayInput As Double
+	Public WHRColdHotInput As Double
+	Public WHRRegPerInput As Double
+	Public WHREngineeringInput As Double
+
+	Protected EngineData As Engine
+
+	Public Sub New(engineDatar As Engine)
+		EngineData = engineDatar
+	End Sub
+
+	Public ReadOnly Property UrbanCorrectionFactor As Double Implements IWHRData.UrbanCorrectionFactor
+		Get
+			Return WHRUrbanInput
+		End Get
+	End Property
+	Public ReadOnly Property RuralCorrectionFactor As Double Implements IWHRData.RuralCorrectionFactor
+		Get
+			Return WHRRuralInput
+		End Get
+	End Property
+	Public ReadOnly Property MotorwayCorrectionFactor As Double Implements IWHRData.MotorwayCorrectionFactor
+		Get
+			Return WHRMotorwayInput
+		End Get
+	End Property
+	Public ReadOnly Property BFColdHot As Double Implements IWHRData.BFColdHot
+		Get
+			Return WHRColdHotInput
+		End Get
+	End Property
+	Public ReadOnly Property CFRegPer As Double Implements IWHRData.CFRegPer
+		Get
+			Return WHRRegPerInput
+		End Get
+	End Property
+
+	Public ReadOnly Property EngineeringCorrectionFactor As Double Implements IWHRData.EngineeringCorrectionFactor
+		Get
+			Return WHREngineeringInput
+		End Get
+	End Property
+
+	Public ReadOnly Property GeneratedPower As TableData Implements IWHRData.GeneratedPower
+		Get
+			If Not File.Exists(EngineData.PrimaryEngineFuel._fuelConsumptionMapPath.FullPath) Then _
+				Throw New VectoException("FuelConsumptionMap is missing or invalid")
+			Return VectoCSVFile.Read(EngineData.PrimaryEngineFuel._fuelConsumptionMapPath.FullPath)
+		End Get
+	End Property
 
 End Class
 
 Public Class EngineFuel
-    Implements IEngineFuelDelcarationInputData, IEngineFuelEngineeringInputData
-
-    ''' <summary>
-    ''' WHTC Urban test results. Saved in input file. 
-    ''' </summary>
-    ''' <remarks></remarks>
-    Public WHTCUrbanInput As Double
-
-    ''' <summary>
-    ''' WHTC Rural test results. Saved in input file. 
-    ''' </summary>
-    ''' <remarks></remarks>
-    Public WHTCRuralInput As Double
-
-    ''' <summary>
-    ''' WHTC Motorway test results. Saved in input file. 
-    ''' </summary>
-    ''' <remarks></remarks>
-    Public WHTCMotorwayInput As Double
-
-    Public WHTCEngineeringInput As Double
-
-    ''' <summary>
-    ''' Path to fuel consumption map
-    ''' </summary>
-    ''' <remarks></remarks>
-    
-    Friend ReadOnly _fuelConsumptionMapPath As SubPath
-
-
-    Public ColdHotBalancingFactorInput As Double
-    Public correctionFactorRegPerInput As Double
-    Public FuelTypeInput As FuelType
-    Private engineData As Engine
-
-    Public Sub New(engine As Engine)
-
-        engineData = engine
-       _fuelConsumptionMapPath = New SubPath
-        
-        SetDefault()
-    End Sub
-
-    ''' <summary>
-    ''' Set default values
-    ''' </summary>
-    ''' <remarks></remarks>
-    Private Sub SetDefault()
-       _fuelConsumptionMapPath.Clear()
-       
-        WHTCUrbanInput = 0
-        WHTCRuralInput = 0
-        WHTCMotorwayInput = 0
-        WHTCEngineeringInput = 1
-    End Sub
-
-    Public ReadOnly Property WHTCMotorway As Double Implements IEngineFuelDelcarationInputData.WHTCMotorway
-        Get
-            Return WHTCMotorwayInput
-        End Get
-    End Property
-
-    Public ReadOnly Property WHTCRural As Double Implements IEngineFuelDelcarationInputData.WHTCRural
-        Get
-            Return WHTCRuralInput
-        End Get
-    End Property
-
-    Public ReadOnly Property WHTCUrban As Double Implements IEngineFuelDelcarationInputData.WHTCUrban
-        Get
-            Return WHTCUrbanInput
-        End Get
-    End Property
-
-    Public ReadOnly Property ColdHotBalancingFactor As Double Implements IEngineFuelDelcarationInputData.ColdHotBalancingFactor
-        Get
-            Return ColdHotBalancingFactorInput
-        End Get
-    End Property
-
-    Public ReadOnly Property CorrectionFactorRegPer As Double Implements IEngineFuelDelcarationInputData.CorrectionFactorRegPer
-        Get
-            Return correctionFactorRegPerInput
-        End Get
-    End Property
-
-    Public ReadOnly Property FuelType As FuelType Implements IEngineFuelDelcarationInputData.FuelType
-        Get
-            Return FuelTypeInput
-        End Get
-    End Property
-
-    ''' <summary>
-    ''' Get or set file path (cSubPath) to FC map (.vmap)
-    ''' </summary>
-    ''' <param name="original">True= (relative) file path as saved in file; False= full file path</param>
-    ''' <value></value>
-    ''' <returns>Relative or absolute file path to FC map</returns>
-    ''' <remarks></remarks>
-    Public Property PathMap(Optional ByVal original As Boolean = False) As String
-        Get
-            If original Then
-                Return _fuelConsumptionMapPath.OriginalPath
-            Else
-                Return _fuelConsumptionMapPath.FullPath
-            End If
-        End Get
-        Set(ByVal value As String)
-            _fuelConsumptionMapPath.Init(engineData._myPath, value)
-        End Set
-    End Property
-
-    Public ReadOnly Property FuelConsumptionMap As TableData Implements IEngineFuelDelcarationInputData.FuelConsumptionMap
-        Get
-            If Not File.Exists(_fuelConsumptionMapPath.FullPath) Then _
-                Throw New VectoException("FuelConsumptionMap is missing or invalid")
-            Return VectoCSVFile.Read(_fuelConsumptionMapPath.FullPath)
-        End Get
-    End Property
-
-    Public ReadOnly Property WHTCEngineering As Double Implements IEngineFuelEngineeringInputData.WHTCEngineering
-    Get
-            Return WHTCEngineeringInput
-    End Get
-    End Property
+	Implements IEngineFuelDelcarationInputData, IEngineFuelEngineeringInputData
+
+	''' <summary>
+	''' WHTC Urban test results. Saved in input file. 
+	''' </summary>
+	''' <remarks></remarks>
+	Public WHTCUrbanInput As Double
+
+	''' <summary>
+	''' WHTC Rural test results. Saved in input file. 
+	''' </summary>
+	''' <remarks></remarks>
+	Public WHTCRuralInput As Double
+
+	''' <summary>
+	''' WHTC Motorway test results. Saved in input file. 
+	''' </summary>
+	''' <remarks></remarks>
+	Public WHTCMotorwayInput As Double
+
+	Public WHTCEngineeringInput As Double
+
+	''' <summary>
+	''' Path to fuel consumption map
+	''' </summary>
+	''' <remarks></remarks>
+
+	Friend ReadOnly _fuelConsumptionMapPath As SubPath
+
+
+	Public ColdHotBalancingFactorInput As Double
+	Public correctionFactorRegPerInput As Double
+	Public FuelTypeInput As FuelType
+	Private engineData As Engine
+
+	Public Sub New(engine As Engine)
+
+		engineData = engine
+		_fuelConsumptionMapPath = New SubPath
+
+		SetDefault()
+	End Sub
+
+	''' <summary>
+	''' Set default values
+	''' </summary>
+	''' <remarks></remarks>
+	Private Sub SetDefault()
+		_fuelConsumptionMapPath.Clear()
+
+		WHTCUrbanInput = 0
+		WHTCRuralInput = 0
+		WHTCMotorwayInput = 0
+		WHTCEngineeringInput = 1
+	End Sub
+
+	Public ReadOnly Property WHTCMotorway As Double Implements IEngineFuelDelcarationInputData.WHTCMotorway
+		Get
+			Return WHTCMotorwayInput
+		End Get
+	End Property
+
+	Public ReadOnly Property WHTCRural As Double Implements IEngineFuelDelcarationInputData.WHTCRural
+		Get
+			Return WHTCRuralInput
+		End Get
+	End Property
+
+	Public ReadOnly Property WHTCUrban As Double Implements IEngineFuelDelcarationInputData.WHTCUrban
+		Get
+			Return WHTCUrbanInput
+		End Get
+	End Property
+
+	Public ReadOnly Property ColdHotBalancingFactor As Double Implements IEngineFuelDelcarationInputData.ColdHotBalancingFactor
+		Get
+			Return ColdHotBalancingFactorInput
+		End Get
+	End Property
+
+	Public ReadOnly Property CorrectionFactorRegPer As Double Implements IEngineFuelDelcarationInputData.CorrectionFactorRegPer
+		Get
+			Return correctionFactorRegPerInput
+		End Get
+	End Property
+
+	Public ReadOnly Property FuelType As FuelType Implements IEngineFuelDelcarationInputData.FuelType
+		Get
+			Return FuelTypeInput
+		End Get
+	End Property
+
+	''' <summary>
+	''' Get or set file path (cSubPath) to FC map (.vmap)
+	''' </summary>
+	''' <param name="original">True= (relative) file path as saved in file; False= full file path</param>
+	''' <value></value>
+	''' <returns>Relative or absolute file path to FC map</returns>
+	''' <remarks></remarks>
+	Public Property PathMap(Optional ByVal original As Boolean = False) As String
+		Get
+			If original Then
+				Return _fuelConsumptionMapPath.OriginalPath
+			Else
+				Return _fuelConsumptionMapPath.FullPath
+			End If
+		End Get
+		Set(ByVal value As String)
+			_fuelConsumptionMapPath.Init(engineData._myPath, value)
+		End Set
+	End Property
+
+	Public ReadOnly Property FuelConsumptionMap As TableData Implements IEngineFuelDelcarationInputData.FuelConsumptionMap
+		Get
+			If Not File.Exists(_fuelConsumptionMapPath.FullPath) Then _
+				Throw New VectoException("FuelConsumptionMap is missing or invalid")
+			Return VectoCSVFile.Read(_fuelConsumptionMapPath.FullPath)
+		End Get
+	End Property
+
+	Public ReadOnly Property WHTCEngineering As Double Implements IEngineFuelEngineeringInputData.WHTCEngineering
+		Get
+			Return WHTCEngineeringInput
+		End Get
+	End Property
 End Class
 
 
 Public Class DummyVehicle
 	Implements IVehicleDeclarationInputData, IVehicleComponentsDeclaration, IVehicleEngineeringInputData, IVehicleComponentsEngineering
-	Public  Property DataSource As DataSource Implements IComponentInputData.DataSource
-	Public  Property SavedInDeclarationMode As Boolean Implements IComponentInputData.SavedInDeclarationMode
-	Public  Property Manufacturer As String Implements IComponentInputData.Manufacturer
-	Public  Property Model As String Implements IComponentInputData.Model
-	Public  Property [Date] As DateTime Implements IComponentInputData.[Date]
-    Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion
-    Public  Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod
-	Public  Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
-	Public  Property DigestValue As DigestData Implements IComponentInputData.DigestValue
-	Public  Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
-	Public  Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
-	Public  Property VIN As String Implements IVehicleDeclarationInputData.VIN
-	Public  Property LegislativeClass As LegislativeClass Implements IVehicleDeclarationInputData.LegislativeClass
-	Public  Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
-	Public  Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
-	Public  Property CurbMassChassis As Kilogram Implements IVehicleDeclarationInputData.CurbMassChassis
-	Public  Property GrossVehicleMassRating As Kilogram Implements IVehicleDeclarationInputData.GrossVehicleMassRating
+	Public Property DataSource As DataSource Implements IComponentInputData.DataSource
+	Public Property SavedInDeclarationMode As Boolean Implements IComponentInputData.SavedInDeclarationMode
+	Public Property Manufacturer As String Implements IComponentInputData.Manufacturer
+	Public Property Model As String Implements IComponentInputData.Model
+	Public Property [Date] As DateTime Implements IComponentInputData.[Date]
+	Public ReadOnly Property AppVersion As String Implements IComponentInputData.AppVersion
+	Public Property CertificationMethod As CertificationMethod Implements IComponentInputData.CertificationMethod
+	Public Property CertificationNumber As String Implements IComponentInputData.CertificationNumber
+	Public Property DigestValue As DigestData Implements IComponentInputData.DigestValue
+	Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
+	Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
+	Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
+	Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
+	Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
+	Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
+	Public Property CurbMassChassis As Kilogram Implements IVehicleDeclarationInputData.CurbMassChassis
+	Public Property GrossVehicleMassRating As Kilogram Implements IVehicleDeclarationInputData.GrossVehicleMassRating
 	Public ReadOnly Property TorqueLimits As IList(Of ITorqueLimitInputData) Implements IVehicleDeclarationInputData.TorqueLimits
-	get
-			Return new List(Of ITorqueLimitInputData)()
-	End Get
-	End Property
-	Public  Property ManufacturerAddress As String Implements IVehicleDeclarationInputData.ManufacturerAddress
-	Public  Property EngineIdleSpeed As PerSecond Implements IVehicleDeclarationInputData.EngineIdleSpeed
-	Public  Property VocationalVehicle As Boolean Implements IVehicleDeclarationInputData.VocationalVehicle
-    Public Property SleeperCab As Boolean Implements IVehicleDeclarationInputData.SleeperCab
-    Public ReadOnly Property AirdragModifiedMultistage As Boolean Implements IVehicleDeclarationInputData.AirdragModifiedMultistage
-    Public Property TankSystem As TankSystem? Implements IVehicleDeclarationInputData.TankSystem
-    Public Property IVehicleEngineeringInputData_ADAS As IAdvancedDriverAssistantSystemsEngineering Implements IVehicleEngineeringInputData.ADAS
-    Public ReadOnly Property IVehicleEngineeringInputData_Components As IVehicleComponentsEngineering Implements IVehicleEngineeringInputData.Components
-        Get
-            Return Me
-        End Get
-    End Property
-    Public Property ADAS As IAdvancedDriverAssistantSystemDeclarationInputData Implements IVehicleDeclarationInputData.ADAS
-    Public ReadOnly Property InitialSOC As Double Implements IVehicleEngineeringInputData.InitialSOC
-    Public ReadOnly Property MaxDrivetrainPower As Watt Implements IVehicleEngineeringInputData.MaxDrivetrainPower
-    Public ReadOnly Property VehicleType As VectoSimulationJobType Implements IVehicleEngineeringInputData.VehicleType
-    Public Property ZeroEmissionVehicle As Boolean Implements IVehicleDeclarationInputData.ZeroEmissionVehicle
-    Public Property HybridElectricHDV As Boolean Implements IVehicleDeclarationInputData.HybridElectricHDV
-    Public Property DualFuelVehicle As Boolean Implements IVehicleDeclarationInputData.DualFuelVehicle
-    Public Property MaxNetPower1 As Watt Implements IVehicleDeclarationInputData.MaxNetPower1
-    Public Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2
-    Public ReadOnly Property RegisteredClass As RegistrationClass Implements IVehicleDeclarationInputData.RegisteredClass
-    Public ReadOnly Property NumberOfPassengersUpperDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersUpperDeck
-    Public ReadOnly Property NumberOfPassengersLowerDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersLowerDeck
-    Public ReadOnly Property CargoVolume As CubicMeter Implements IVehicleDeclarationInputData.CargoVolume
-    Public ReadOnly Property VehicleCode As VehicleCode Implements IVehicleDeclarationInputData.VehicleCode
-    Public Property CurbMassExtra As Kilogram Implements IVehicleEngineeringInputData.CurbMassExtra
-    Public Property Loading As Kilogram Implements IVehicleEngineeringInputData.Loading
-    Public Property DynamicTyreRadius As Meter Implements IVehicleEngineeringInputData.DynamicTyreRadius
-    Public Property Height As Meter Implements IVehicleEngineeringInputData.Height
-    Public ReadOnly Property LowEntry As Boolean Implements IVehicleDeclarationInputData.LowEntry
-    Public ReadOnly Property Articulated As Boolean Implements IVehicleDeclarationInputData.Articulated
-    Public ReadOnly Property IVehicleDeclarationInputData_Height As Meter Implements IVehicleDeclarationInputData.Height
-    Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length
-    Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width
-    Public ReadOnly Property EntranceHeight As Meter Implements IVehicleDeclarationInputData.EntranceHeight
-    Public ReadOnly Property DoorDriveTechnology As ConsumerTechnology Implements IVehicleDeclarationInputData.DoorDriveTechnology
-    Public ReadOnly Property StateOfCompletion As StateOfCompletion Implements IVehicleDeclarationInputData.StateOfCompletion
-
-    Public readonly Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components
-	get
-			Return me
-	End Get
-	End Property
-
-    Public ReadOnly Property XMLSource As XmlNode Implements IVehicleDeclarationInputData.XMLSource
-
-    Public  Property AirdragInputData As IAirdragDeclarationInputData Implements IVehicleComponentsDeclaration.AirdragInputData
-    Public  Property IVehicleComponentsEngineering_GearboxInputData As IGearboxEngineeringInputData Implements IVehicleComponentsEngineering.GearboxInputData
-    Public  Property IVehicleComponentsEngineering_AirdragInputData As IAirdragEngineeringInputData Implements IVehicleComponentsEngineering.AirdragInputData
-    Public Property GearboxInputData As IGearboxDeclarationInputData Implements IVehicleComponentsDeclaration.GearboxInputData
-    Public  Property IVehicleComponentsEngineering_TorqueConverterInputData As ITorqueConverterEngineeringInputData Implements IVehicleComponentsEngineering.TorqueConverterInputData
-    Public  Property TorqueConverterInputData As ITorqueConverterDeclarationInputData Implements IVehicleComponentsDeclaration.TorqueConverterInputData
-    Public  Property IVehicleComponentsEngineering_AxleGearInputData As IAxleGearInputData Implements IVehicleComponentsEngineering.AxleGearInputData
-    Public  Property AxleGearInputData As IAxleGearInputData Implements IVehicleComponentsDeclaration.AxleGearInputData
-    Public  Property IVehicleComponentsEngineering_AngledriveInputData As IAngledriveInputData Implements IVehicleComponentsEngineering.AngledriveInputData
-    Public  Property AngledriveInputData As IAngledriveInputData Implements IVehicleComponentsDeclaration.AngledriveInputData
-    Public  Property IVehicleComponentsEngineering_EngineInputData As IEngineEngineeringInputData Implements IVehicleComponentsEngineering.EngineInputData
-    Public Property EngineInputData As IEngineDeclarationInputData Implements IVehicleComponentsDeclaration.EngineInputData
-    Public  Property IVehicleComponentsEngineering_AuxiliaryInputData As IAuxiliariesEngineeringInputData Implements IVehicleComponentsEngineering.AuxiliaryInputData
-    Public  Property AuxiliaryInputData As IAuxiliariesDeclarationInputData Implements IVehicleComponentsDeclaration.AuxiliaryInputData
-    Public  Property IVehicleComponentsEngineering_RetarderInputData As IRetarderInputData Implements IVehicleComponentsEngineering.RetarderInputData
-    Public  Property RetarderInputData As IRetarderInputData Implements IVehicleComponentsDeclaration.RetarderInputData
-    Public  Property IVehicleComponentsEngineering_PTOTransmissionInputData As IPTOTransmissionInputData Implements IVehicleComponentsEngineering.PTOTransmissionInputData
-    Public  Property PTOTransmissionInputData As IPTOTransmissionInputData Implements IVehicleComponentsDeclaration.PTOTransmissionInputData
-    Public  Property IVehicleComponentsEngineering_AxleWheels As IAxlesEngineeringInputData Implements IVehicleComponentsEngineering.AxleWheels
-    Public  Property AxleWheels As IAxlesDeclarationInputData Implements IVehicleComponentsDeclaration.AxleWheels
-    Public ReadOnly Property IVehicleComponentsEngineering_ElectricStorage As IElectricStorageEngineeringInputData Implements IVehicleComponentsEngineering.ElectricStorage
-    Public ReadOnly Property BusAuxiliaries As IBusAuxiliariesDeclarationData Implements IVehicleComponentsDeclaration.BusAuxiliaries
-    Public ReadOnly Property ElectricStorage As IElectricStorageDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricStorage
-    Public ReadOnly Property IVehicleComponentsEngineering_ElectricMachines As IElectricMachinesEngineeringInputData Implements IVehicleComponentsEngineering.ElectricMachines
-    Public ReadOnly Property ElectricMachines As IElectricMachinesDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricMachines
+		Get
+			Return New List(Of ITorqueLimitInputData)()
+		End Get
+	End Property
+	Public Property ManufacturerAddress As String Implements IVehicleDeclarationInputData.ManufacturerAddress
+	Public Property EngineIdleSpeed As PerSecond Implements IVehicleDeclarationInputData.EngineIdleSpeed
+	Public Property VocationalVehicle As Boolean Implements IVehicleDeclarationInputData.VocationalVehicle
+	Public Property SleeperCab As Boolean Implements IVehicleDeclarationInputData.SleeperCab
+	Public ReadOnly Property AirdragModifiedMultistage As Boolean? Implements IVehicleDeclarationInputData.AirdragModifiedMultistage
+	Public Property TankSystem As TankSystem? Implements IVehicleDeclarationInputData.TankSystem
+	Public Property IVehicleEngineeringInputData_ADAS As IAdvancedDriverAssistantSystemsEngineering Implements IVehicleEngineeringInputData.ADAS
+	Public ReadOnly Property IVehicleEngineeringInputData_Components As IVehicleComponentsEngineering Implements IVehicleEngineeringInputData.Components
+		Get
+			Return Me
+		End Get
+	End Property
+	Public Property ADAS As IAdvancedDriverAssistantSystemDeclarationInputData Implements IVehicleDeclarationInputData.ADAS
+	Public ReadOnly Property InitialSOC As Double Implements IVehicleEngineeringInputData.InitialSOC
+	Public ReadOnly Property MaxDrivetrainPower As Watt Implements IVehicleEngineeringInputData.MaxDrivetrainPower
+	Public ReadOnly Property VehicleType As VectoSimulationJobType Implements IVehicleEngineeringInputData.VehicleType
+	Public Property ZeroEmissionVehicle As Boolean Implements IVehicleDeclarationInputData.ZeroEmissionVehicle
+	Public Property HybridElectricHDV As Boolean Implements IVehicleDeclarationInputData.HybridElectricHDV
+	Public Property DualFuelVehicle As Boolean Implements IVehicleDeclarationInputData.DualFuelVehicle
+	Public Property MaxNetPower1 As Watt Implements IVehicleDeclarationInputData.MaxNetPower1
+	Public Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2
+	Public ReadOnly Property RegisteredClass As RegistrationClass? Implements IVehicleDeclarationInputData.RegisteredClass
+	Public ReadOnly Property NumberOfPassengersUpperDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersUpperDeck
+	Public ReadOnly Property NumberOfPassengersLowerDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersLowerDeck
+	Public ReadOnly Property CargoVolume As CubicMeter Implements IVehicleDeclarationInputData.CargoVolume
+	Public ReadOnly Property VehicleCode As VehicleCode? Implements IVehicleDeclarationInputData.VehicleCode
+	Public Property CurbMassExtra As Kilogram Implements IVehicleEngineeringInputData.CurbMassExtra
+	Public Property Loading As Kilogram Implements IVehicleEngineeringInputData.Loading
+	Public Property DynamicTyreRadius As Meter Implements IVehicleEngineeringInputData.DynamicTyreRadius
+	Public Property Height As Meter Implements IVehicleEngineeringInputData.Height
+	Public ReadOnly Property LowEntry As Boolean? Implements IVehicleDeclarationInputData.LowEntry
+	Public ReadOnly Property Articulated As Boolean Implements IVehicleDeclarationInputData.Articulated
+	Public ReadOnly Property IVehicleDeclarationInputData_Height As Meter Implements IVehicleDeclarationInputData.Height
+	Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length
+	Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width
+	Public ReadOnly Property EntranceHeight As Meter Implements IVehicleDeclarationInputData.EntranceHeight
+	Public ReadOnly Property DoorDriveTechnology As ConsumerTechnology? Implements IVehicleDeclarationInputData.DoorDriveTechnology
+	Public ReadOnly Property StateOfCompletion As StateOfCompletion Implements IVehicleDeclarationInputData.StateOfCompletion
+
+	Public ReadOnly Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components
+		Get
+			Return Me
+		End Get
+	End Property
+
+	Public ReadOnly Property XMLSource As XmlNode Implements IVehicleDeclarationInputData.XMLSource
+
+	Public Property AirdragInputData As IAirdragDeclarationInputData Implements IVehicleComponentsDeclaration.AirdragInputData
+	Public Property IVehicleComponentsEngineering_GearboxInputData As IGearboxEngineeringInputData Implements IVehicleComponentsEngineering.GearboxInputData
+	Public Property IVehicleComponentsEngineering_AirdragInputData As IAirdragEngineeringInputData Implements IVehicleComponentsEngineering.AirdragInputData
+	Public Property GearboxInputData As IGearboxDeclarationInputData Implements IVehicleComponentsDeclaration.GearboxInputData
+	Public Property IVehicleComponentsEngineering_TorqueConverterInputData As ITorqueConverterEngineeringInputData Implements IVehicleComponentsEngineering.TorqueConverterInputData
+	Public Property TorqueConverterInputData As ITorqueConverterDeclarationInputData Implements IVehicleComponentsDeclaration.TorqueConverterInputData
+	Public Property IVehicleComponentsEngineering_AxleGearInputData As IAxleGearInputData Implements IVehicleComponentsEngineering.AxleGearInputData
+	Public Property AxleGearInputData As IAxleGearInputData Implements IVehicleComponentsDeclaration.AxleGearInputData
+	Public Property IVehicleComponentsEngineering_AngledriveInputData As IAngledriveInputData Implements IVehicleComponentsEngineering.AngledriveInputData
+	Public Property AngledriveInputData As IAngledriveInputData Implements IVehicleComponentsDeclaration.AngledriveInputData
+	Public Property IVehicleComponentsEngineering_EngineInputData As IEngineEngineeringInputData Implements IVehicleComponentsEngineering.EngineInputData
+	Public Property EngineInputData As IEngineDeclarationInputData Implements IVehicleComponentsDeclaration.EngineInputData
+	Public Property IVehicleComponentsEngineering_AuxiliaryInputData As IAuxiliariesEngineeringInputData Implements IVehicleComponentsEngineering.AuxiliaryInputData
+	Public Property AuxiliaryInputData As IAuxiliariesDeclarationInputData Implements IVehicleComponentsDeclaration.AuxiliaryInputData
+	Public Property IVehicleComponentsEngineering_RetarderInputData As IRetarderInputData Implements IVehicleComponentsEngineering.RetarderInputData
+	Public Property RetarderInputData As IRetarderInputData Implements IVehicleComponentsDeclaration.RetarderInputData
+	Public Property IVehicleComponentsEngineering_PTOTransmissionInputData As IPTOTransmissionInputData Implements IVehicleComponentsEngineering.PTOTransmissionInputData
+	Public Property PTOTransmissionInputData As IPTOTransmissionInputData Implements IVehicleComponentsDeclaration.PTOTransmissionInputData
+	Public Property IVehicleComponentsEngineering_AxleWheels As IAxlesEngineeringInputData Implements IVehicleComponentsEngineering.AxleWheels
+	Public Property AxleWheels As IAxlesDeclarationInputData Implements IVehicleComponentsDeclaration.AxleWheels
+	Public ReadOnly Property IVehicleComponentsEngineering_ElectricStorage As IElectricStorageEngineeringInputData Implements IVehicleComponentsEngineering.ElectricStorage
+	Public ReadOnly Property BusAuxiliaries As IBusAuxiliariesDeclarationData Implements IVehicleComponentsDeclaration.BusAuxiliaries
+	Public ReadOnly Property ElectricStorage As IElectricStorageDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricStorage
+	Public ReadOnly Property IVehicleComponentsEngineering_ElectricMachines As IElectricMachinesEngineeringInputData Implements IVehicleComponentsEngineering.ElectricMachines
+	Public ReadOnly Property ElectricMachines As IElectricMachinesDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricMachines
 End Class
 
 
diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb
index ce6cb559fe..498993d89c 100644
--- a/VECTO/Input Files/Gearbox.vb	
+++ b/VECTO/Input Files/Gearbox.vb	
@@ -801,7 +801,7 @@ Public Class MockEngineeringVehicle
     Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
     Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
     Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
-    Public Property LegislativeClass As LegislativeClass Implements IVehicleDeclarationInputData.LegislativeClass
+    Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
     Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
     Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
     Public Property CurbMassChassis As Kilogram Implements IVehicleDeclarationInputData.CurbMassChassis
@@ -811,7 +811,7 @@ Public Class MockEngineeringVehicle
     Public Property EngineIdleSpeed As PerSecond Implements IVehicleDeclarationInputData.EngineIdleSpeed
     Public Property VocationalVehicle As Boolean Implements IVehicleDeclarationInputData.VocationalVehicle
     Public Property SleeperCab As Boolean Implements IVehicleDeclarationInputData.SleeperCab
-    Public ReadOnly Property AirdragModifiedMultistage As Boolean Implements IVehicleDeclarationInputData.AirdragModifiedMultistage
+    Public ReadOnly Property AirdragModifiedMultistage As Boolean? Implements IVehicleDeclarationInputData.AirdragModifiedMultistage
     Public Property TankSystem As TankSystem? Implements IVehicleDeclarationInputData.TankSystem
 
     Public Property IVehicleEngineeringInputData_ADAS As IAdvancedDriverAssistantSystemsEngineering _
@@ -836,12 +836,12 @@ Public Class MockEngineeringVehicle
     Public Property DualFuelVehicle As Boolean Implements IVehicleDeclarationInputData.DualFuelVehicle
     Public Property MaxNetPower1 As Watt Implements IVehicleDeclarationInputData.MaxNetPower1
     Public Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2
-    Public ReadOnly Property RegisteredClass As RegistrationClass Implements IVehicleDeclarationInputData.RegisteredClass
+    Public ReadOnly Property RegisteredClass As RegistrationClass? Implements IVehicleDeclarationInputData.RegisteredClass
     Public ReadOnly Property NumberOfPassengersUpperDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersUpperDeck
     Public ReadOnly Property NumberOfPassengersLowerDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersLowerDeck
     Public ReadOnly Property CargoVolume As CubicMeter Implements IVehicleDeclarationInputData.CargoVolume
-    Public ReadOnly Property VehicleCode As VehicleCode Implements IVehicleDeclarationInputData.VehicleCode
-    Public ReadOnly Property LowEntry As Boolean Implements IVehicleDeclarationInputData.LowEntry
+    Public ReadOnly Property VehicleCode As VehicleCode? Implements IVehicleDeclarationInputData.VehicleCode
+    Public ReadOnly Property LowEntry As Boolean? Implements IVehicleDeclarationInputData.LowEntry
     Public ReadOnly Property Articulated As Boolean Implements IVehicleDeclarationInputData.Articulated
     Public ReadOnly Property IVehicleDeclarationInputData_Height As Meter Implements IVehicleDeclarationInputData.Height
     Public Property CurbMassExtra As Kilogram Implements IVehicleEngineeringInputData.CurbMassExtra
@@ -851,7 +851,7 @@ Public Class MockEngineeringVehicle
     Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length
     Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width
     Public ReadOnly Property EntranceHeight As Meter Implements IVehicleDeclarationInputData.EntranceHeight
-    Public ReadOnly Property DoorDriveTechnology As ConsumerTechnology Implements IVehicleDeclarationInputData.DoorDriveTechnology
+    Public ReadOnly Property DoorDriveTechnology As ConsumerTechnology? Implements IVehicleDeclarationInputData.DoorDriveTechnology
     Public ReadOnly Property StateOfCompletion As StateOfCompletion Implements IVehicleDeclarationInputData.StateOfCompletion
     Public Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components
     Public ReadOnly Property XMLSource As XmlNode Implements IVehicleDeclarationInputData.XMLSource
diff --git a/VECTO/Input Files/MockVehicleInputData.vb b/VECTO/Input Files/MockVehicleInputData.vb
index 6baf286bb1..96fa79e9d8 100644
--- a/VECTO/Input Files/MockVehicleInputData.vb	
+++ b/VECTO/Input Files/MockVehicleInputData.vb	
@@ -19,7 +19,7 @@ Public Class MockVehicleInputData
     Public Property Identifier As String Implements IVehicleDeclarationInputData.Identifier
     Public Property ExemptedVehicle As Boolean Implements IVehicleDeclarationInputData.ExemptedVehicle
     Public Property VIN As String Implements IVehicleDeclarationInputData.VIN
-    Public Property LegislativeClass As LegislativeClass Implements IVehicleDeclarationInputData.LegislativeClass
+    Public Property LegislativeClass As LegislativeClass? Implements IVehicleDeclarationInputData.LegislativeClass
     Public Property VehicleCategory As VehicleCategory Implements IVehicleDeclarationInputData.VehicleCategory
     Public Property AxleConfiguration As AxleConfiguration Implements IVehicleDeclarationInputData.AxleConfiguration
     Public Property CurbMassChassis As Kilogram Implements IVehicleDeclarationInputData.CurbMassChassis
@@ -29,7 +29,7 @@ Public Class MockVehicleInputData
     Public Property EngineIdleSpeed As PerSecond Implements IVehicleDeclarationInputData.EngineIdleSpeed
     Public Property VocationalVehicle As Boolean Implements IVehicleDeclarationInputData.VocationalVehicle
     Public Property SleeperCab As Boolean Implements IVehicleDeclarationInputData.SleeperCab
-    Public ReadOnly Property AirdragModifiedMultistage As Boolean Implements IVehicleDeclarationInputData.AirdragModifiedMultistage
+    Public ReadOnly Property AirdragModifiedMultistage As Boolean? Implements IVehicleDeclarationInputData.AirdragModifiedMultistage
     Public Property TankSystem As TankSystem? Implements IVehicleDeclarationInputData.TankSystem
 
     Public Property ADAS As IAdvancedDriverAssistantSystemDeclarationInputData _
@@ -40,18 +40,18 @@ Public Class MockVehicleInputData
     Public Property DualFuelVehicle As Boolean Implements IVehicleDeclarationInputData.DualFuelVehicle
     Public Property MaxNetPower1 As Watt Implements IVehicleDeclarationInputData.MaxNetPower1
     Public Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2
-    Public ReadOnly Property RegisteredClass As RegistrationClass Implements IVehicleDeclarationInputData.RegisteredClass
+    Public ReadOnly Property RegisteredClass As RegistrationClass? Implements IVehicleDeclarationInputData.RegisteredClass
     Public ReadOnly Property NumberOfPassengersUpperDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersUpperDeck
     Public ReadOnly Property NumberOfPassengersLowerDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersLowerDeck
     Public ReadOnly Property CargoVolume As CubicMeter Implements IVehicleDeclarationInputData.CargoVolume
-    Public ReadOnly Property VehicleCode As VehicleCode Implements IVehicleDeclarationInputData.VehicleCode
-    Public ReadOnly Property LowEntry As Boolean Implements IVehicleDeclarationInputData.LowEntry
+    Public ReadOnly Property VehicleCode As VehicleCode? Implements IVehicleDeclarationInputData.VehicleCode
+    Public ReadOnly Property LowEntry As Boolean? Implements IVehicleDeclarationInputData.LowEntry
     Public ReadOnly Property Articulated As Boolean Implements IVehicleDeclarationInputData.Articulated
     Public ReadOnly Property Height As Meter Implements IVehicleDeclarationInputData.Height
     Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length
     Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width
     Public ReadOnly Property EntranceHeight As Meter Implements IVehicleDeclarationInputData.EntranceHeight
-    Public ReadOnly Property DoorDriveTechnology As ConsumerTechnology Implements IVehicleDeclarationInputData.DoorDriveTechnology
+    Public ReadOnly Property DoorDriveTechnology As ConsumerTechnology? Implements IVehicleDeclarationInputData.DoorDriveTechnology
     Public ReadOnly Property StateOfCompletion As StateOfCompletion Implements IVehicleDeclarationInputData.StateOfCompletion
     Public Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components
     Public ReadOnly Property XMLSource As XmlNode Implements IVehicleDeclarationInputData.XMLSource
diff --git a/VECTO/Input Files/Vehicle.vb b/VECTO/Input Files/Vehicle.vb
index 3320172738..632deaf8c4 100644
--- a/VECTO/Input Files/Vehicle.vb	
+++ b/VECTO/Input Files/Vehicle.vb	
@@ -362,7 +362,7 @@ Public Class Vehicle
 		End Get
 	End Property
 
-	Public ReadOnly Property LegislativeClass As LegislativeClass Implements IVehicleEngineeringInputData.LegislativeClass
+	Public ReadOnly Property LegislativeClass As LegislativeClass? Implements IVehicleEngineeringInputData.LegislativeClass
 		Get
 			Return legClass
 		End Get
@@ -440,7 +440,7 @@ Public Class Vehicle
 	Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length
 	Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width
 	Public ReadOnly Property EntranceHeight As Meter Implements IVehicleDeclarationInputData.EntranceHeight
-	Public ReadOnly Property DoorDriveTechnology As ConsumerTechnology Implements IVehicleDeclarationInputData.DoorDriveTechnology
+	Public ReadOnly Property DoorDriveTechnology As ConsumerTechnology? Implements IVehicleDeclarationInputData.DoorDriveTechnology
 	Public ReadOnly Property StateOfCompletion As StateOfCompletion Implements IVehicleDeclarationInputData.StateOfCompletion
 
 	Public ReadOnly Property IVehicleEngineeringInputData_Components As IVehicleComponentsEngineering Implements IVehicleEngineeringInputData.Components
@@ -740,7 +740,7 @@ Public Class Vehicle
 		End Get
 	End Property
 
-	Public ReadOnly Property AirdragModifiedMultistage As Boolean Implements IVehicleDeclarationInputData.AirdragModifiedMultistage
+	Public ReadOnly Property AirdragModifiedMultistage As Boolean? Implements IVehicleDeclarationInputData.AirdragModifiedMultistage
 
 	Public ReadOnly Property TankSystem As TankSystem? Implements IVehicleDeclarationInputData.TankSystem
 		Get
@@ -799,12 +799,12 @@ Public Class Vehicle
 		End Get
 	End Property
 
-	Public ReadOnly Property RegisteredClass As RegistrationClass Implements IVehicleDeclarationInputData.RegisteredClass
+	Public ReadOnly Property RegisteredClass As RegistrationClass? Implements IVehicleDeclarationInputData.RegisteredClass
 	Public ReadOnly Property NumberOfPassengersUpperDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersUpperDeck
 	Public ReadOnly Property NumberOfPassengersLowerDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersLowerDeck
 	Public ReadOnly Property CargoVolume As CubicMeter Implements IVehicleDeclarationInputData.CargoVolume
-	Public ReadOnly Property VehicleCode As VehicleCode Implements IVehicleDeclarationInputData.VehicleCode
-	Public ReadOnly Property LowEntry As Boolean Implements IVehicleDeclarationInputData.LowEntry
+	Public ReadOnly Property VehicleCode As VehicleCode? Implements IVehicleDeclarationInputData.VehicleCode
+	Public ReadOnly Property LowEntry As Boolean? Implements IVehicleDeclarationInputData.LowEntry
 
 	Public ReadOnly Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components
 		Get
diff --git a/VectoCommon/VectoCommon/BusAuxiliaries/IPneumaticUserInputsConfig.cs b/VectoCommon/VectoCommon/BusAuxiliaries/IPneumaticUserInputsConfig.cs
index 7aff80b083..f28993a2e0 100644
--- a/VectoCommon/VectoCommon/BusAuxiliaries/IPneumaticUserInputsConfig.cs
+++ b/VectoCommon/VectoCommon/BusAuxiliaries/IPneumaticUserInputsConfig.cs
@@ -18,7 +18,7 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
 
 		ConsumerTechnology AirSuspensionControl { get; } // mechanical or electrical
 		ConsumerTechnology AdBlueDosing { get; } // pnmeumatic or electric
-		ConsumerTechnology Doors { get; } // pneumatic or electric
+		ConsumerTechnology? Doors { get; } // pneumatic or electric
 	}
 
 	public enum ConsumerTechnology
@@ -47,14 +47,14 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
 				case "pneumatically":
 				case "pneumatic":
 					return ConsumerTechnology.Pneumatically;
-                case "mixed":
+				case "mixed":
 					return ConsumerTechnology.Mixed;
 				default:
 					return ConsumerTechnology.Unknown;
 			}
 		}
 
-		public static string GetLabel(this ConsumerTechnology technology)
+		public static string GetLabel(this ConsumerTechnology? technology)
 		{
 			switch (technology) {
 				case ConsumerTechnology.Electrically:
@@ -68,7 +68,7 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
 			}
 		}
 
-		public static string ToXMLFormat(this ConsumerTechnology technology)
+		public static string ToXMLFormat(this ConsumerTechnology? technology)
 		{
 			return technology.GetLabel().ToLowerInvariant();
 		}
diff --git a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs
index f7e9d99647..405aeec543 100644
--- a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs
+++ b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs
@@ -97,7 +97,7 @@ namespace TUGraz.VectoCommon.InputData
 
 		string VIN { get; }
 
-		LegislativeClass LegislativeClass { get; }
+		LegislativeClass? LegislativeClass { get; }
 
 		/// <summary>
 		/// P036
@@ -147,7 +147,7 @@ namespace TUGraz.VectoCommon.InputData
 
 		bool SleeperCab { get; }
 
-		bool AirdragModifiedMultistage { get; }
+		bool? AirdragModifiedMultistage { get; }
 
 		TankSystem? TankSystem { get; }
 
@@ -165,7 +165,7 @@ namespace TUGraz.VectoCommon.InputData
 
 		Watt MaxNetPower2 { get; }
 
-		RegistrationClass RegisteredClass { get; }
+		RegistrationClass? RegisteredClass { get; }
 
 		int NumberOfPassengersUpperDeck { get; }
 
@@ -174,9 +174,9 @@ namespace TUGraz.VectoCommon.InputData
 		// only used for medium lorries type VAN
 		CubicMeter CargoVolume { get; }
 
-		VehicleCode VehicleCode { get; }
+		VehicleCode? VehicleCode { get; }
 
-		bool LowEntry { get; }
+		bool? LowEntry { get; }
 
 		bool Articulated { get; }
 
@@ -188,7 +188,7 @@ namespace TUGraz.VectoCommon.InputData
 
 		Meter EntranceHeight { get; }
 
-		ConsumerTechnology DoorDriveTechnology { get; }
+		ConsumerTechnology? DoorDriveTechnology { get; }
 
 		StateOfCompletion StateOfCompletion { get; }
 
diff --git a/VectoCommon/VectoCommon/Models/LegislativeClass.cs b/VectoCommon/VectoCommon/Models/LegislativeClass.cs
index cf710de297..098b5a053e 100644
--- a/VectoCommon/VectoCommon/Models/LegislativeClass.cs
+++ b/VectoCommon/VectoCommon/Models/LegislativeClass.cs
@@ -41,12 +41,12 @@ namespace TUGraz.VectoCommon.Models
 
 	public static class LegislativeClassHelper
 	{
-		public static string GetLabel(this LegislativeClass self)
+		public static string GetLabel(this LegislativeClass? self)
 		{
 			return self.ToString();
 		}
 
-		public static string ToXMLFormat(this LegislativeClass self)
+		public static string ToXMLFormat(this LegislativeClass? self)
 		{
 			return self.ToString();
 		}
diff --git a/VectoCommon/VectoCommon/Models/RegistrationClass.cs b/VectoCommon/VectoCommon/Models/RegistrationClass.cs
index 518ecd1294..4e283443ba 100644
--- a/VectoCommon/VectoCommon/Models/RegistrationClass.cs
+++ b/VectoCommon/VectoCommon/Models/RegistrationClass.cs
@@ -21,7 +21,7 @@ namespace TUGraz.VectoCommon.Models
 	
 	public static class RegistrationClassHelper
 	{
-		public static string GetLabel(this RegistrationClass self)
+		public static string GetLabel(this RegistrationClass? self)
 		{
 			switch (self) {
 				case RegistrationClass.I_II:
@@ -33,16 +33,19 @@ namespace TUGraz.VectoCommon.Models
 			}
 		}
 
-		public static string ToXMLFormat(this RegistrationClass self)
+
+
+
+		public static string ToXMLFormat(this RegistrationClass? self)
 		{
 			return self.GetLabel();
 		}
 
-		public static RegistrationClass[] Parse(string registrationClasses)
+		public static RegistrationClass?[] Parse(string registrationClasses)
 		{
 			var classes = registrationClasses.Split('/');
 			if (classes.Length > 0) {
-				var result = new List<RegistrationClass>();
+				var result = new List<RegistrationClass?>();
 				for (int i = 0; i < classes.Length; i++) {
 
 					var regClass = ParseRegistrationClassString(classes[i]);
@@ -54,27 +57,27 @@ namespace TUGraz.VectoCommon.Models
 			return null;
 		}
 		
-		private static RegistrationClass ParseRegistrationClassString(string registrationClass)
+		private static RegistrationClass? ParseRegistrationClassString(string registrationClass)
 		{
-			if (RegistrationClass.I.GetLabel() == registrationClass)
+			if (((RegistrationClass?)RegistrationClass.I).GetLabel() == registrationClass)
 				return RegistrationClass.I;
 
-			if (RegistrationClass.II.GetLabel() == registrationClass)
+			if (((RegistrationClass?)RegistrationClass.II).GetLabel() == registrationClass)
 				return RegistrationClass.II;
 
-			if (RegistrationClass.III.GetLabel() == registrationClass)
+			if (((RegistrationClass?)RegistrationClass.III).GetLabel() == registrationClass)
 				return RegistrationClass.III;
 
-			if (RegistrationClass.II_III.GetLabel() == registrationClass)
+			if (((RegistrationClass?)RegistrationClass.II_III).GetLabel() == registrationClass)
 				return RegistrationClass.II_III;
 
-			if (RegistrationClass.I_II.GetLabel() == registrationClass)
+			if (((RegistrationClass?)RegistrationClass.I_II).GetLabel() == registrationClass)
 				return RegistrationClass.I_II;
 
-			if (RegistrationClass.A.GetLabel() == registrationClass)
+			if (((RegistrationClass?)RegistrationClass.A).GetLabel() == registrationClass)
 				return RegistrationClass.A;
 
-			if (RegistrationClass.B.GetLabel() == registrationClass)
+			if (((RegistrationClass?)RegistrationClass.B).GetLabel() == registrationClass)
 				return RegistrationClass.B;
 
 			return RegistrationClass.unknown;
diff --git a/VectoCommon/VectoCommon/Models/VehicleCode.cs b/VectoCommon/VectoCommon/Models/VehicleCode.cs
index 31e54f5e67..8df981cb9e 100644
--- a/VectoCommon/VectoCommon/Models/VehicleCode.cs
+++ b/VectoCommon/VectoCommon/Models/VehicleCode.cs
@@ -20,17 +20,17 @@ namespace TUGraz.VectoCommon.Models {
 	public static class VehicleCodeHelper
 	{
 
-		public static string GetLabel(this VehicleCode self)
+		public static string GetLabel(this VehicleCode? self)
 		{
 			return self.ToString();
 		}
 
-		public static string ToXMLFormat(this VehicleCode self)
+		public static string ToXMLFormat(this VehicleCode? self)
 		{
 			return self.ToString();
 		}
 
-		public static bool IsDoubleDeckerBus(this VehicleCode self)
+		public static bool IsDoubleDeckerBus(this VehicleCode? self)
 		{
 			switch (self) {
 				case VehicleCode.CF:
@@ -50,7 +50,7 @@ namespace TUGraz.VectoCommon.Models {
 			}
 		}
 
-		public static FloorType GetFloorType(this VehicleCode vehicleCode)
+		public static FloorType GetFloorType(this VehicleCode? vehicleCode)
 		{
 			switch (vehicleCode) {
 				case VehicleCode.CA:
diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs
index d1071c5435..26ed85a637 100644
--- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONComponentInputData.cs
@@ -223,7 +223,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return VehicleData.VIN; }
 		}
 
-		public LegislativeClass LegislativeClass
+		public LegislativeClass? LegislativeClass
 		{
 			get { return VehicleData.LegislativeClass; }
 		}
@@ -335,7 +335,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return null; }
 		}
 
-		public ConsumerTechnology DoorDriveTechnology
+		public ConsumerTechnology? DoorDriveTechnology
 		{
 			get { return VehicleData.DoorDriveTechnology; }
 		}
@@ -488,7 +488,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return DeclarationData.Vehicle.SleeperCabDefault; }
 		}
 
-		public bool AirdragModifiedMultistage { get; }
+		public bool? AirdragModifiedMultistage { get; }
 
 		public TankSystem? TankSystem
 		{
@@ -525,7 +525,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return null; }
 		}
 
-		public RegistrationClass RegisteredClass
+		public RegistrationClass? RegisteredClass
 		{
 			get { return RegistrationClass.unknown; }
 		}
@@ -545,12 +545,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return VehicleData.CargoVolume; }
 		}
 
-		public VehicleCode VehicleCode
+		public VehicleCode? VehicleCode
 		{
-			get { return VehicleCode.NOT_APPLICABLE; }
+			get { return VectoCommon.Models.VehicleCode.NOT_APPLICABLE; }
 		}
 
-		public bool LowEntry
+		public bool? LowEntry
 		{
 			get { return VehicleData.LowEntry; }
 		}
diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs
index b857b8ab92..6d914cf844 100644
--- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs
@@ -86,8 +86,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get
 			{
 				switch (Body.GetEx<String>("PowertrainConfiguration")) {
-                    case "ParallelHybrid": return VectoSimulationJobType.ParallelHybridVehicle;
-                    case "BatteryElectric": return VectoSimulationJobType.BatteryElectricVehicle;
+					case "ParallelHybrid": return VectoSimulationJobType.ParallelHybridVehicle;
+					case "BatteryElectric": return VectoSimulationJobType.BatteryElectricVehicle;
 					default: throw new VectoException("Invalid parameter value {0}", Body.GetEx<String>("PowertrainConfiguration"));
 				}
 			}
@@ -132,7 +132,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 		}
 
 
-        protected virtual JSONElectricStorageEngineeringInputData ReadBatteries()
+		protected virtual JSONElectricStorageEngineeringInputData ReadBatteries()
 		{
 			return new JSONElectricStorageEngineeringInputData() {
 				Count = Body["Battery"].GetEx<int>("NumPacks"),
@@ -173,9 +173,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			return _adasInputData ?? (_adasInputData = new JSONADASInputDataV9(this));
 		}
 
-        #endregion
+		#endregion
 
-        #endregion
+		#endregion
 	}
 
 	// ###################################################################
@@ -197,7 +197,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 		{
 			return _adasInputData ?? (_adasInputData = new JSONADASInputDataV8(this));
 		}
-    }
+	}
 
 	// ###################################################################
 	// ###################################################################
@@ -207,7 +207,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 		IVehicleComponentsDeclaration, IVehicleComponentsEngineering, IAxlesEngineeringInputData, IAxlesDeclarationInputData
 		//IAdvancedDriverAssistantSystemsEngineering, IAdvancedDriverAssistantSystemDeclarationInputData
 
-    {
+	{
 		public JSONVehicleDataV7(JObject data, string fileName, IJSONVehicleComponents job, bool tolerateMissing = false)
 			: base(data, fileName, tolerateMissing)
 		{
@@ -238,12 +238,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return Constants.NOT_AVailABLE; }
 		}
 
-		public virtual LegislativeClass LegislativeClass
+		public virtual LegislativeClass? LegislativeClass
 		{
 			get {
 				return Body["LegislativeClass"] != null
 					? Body["LegislativeClass"].Value<string>().ParseEnum<LegislativeClass>()
-					: LegislativeClass.Unknown;
+					: VectoCommon.Models.LegislativeClass.Unknown;
 			}
 		}
 
@@ -319,7 +319,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 		}
 
 		public virtual Meter EntranceHeight { get { return null; } }
-		public virtual ConsumerTechnology DoorDriveTechnology { get { return ConsumerTechnology.Unknown; } }
+		public virtual ConsumerTechnology? DoorDriveTechnology { get { return ConsumerTechnology.Unknown; } }
 
 		public virtual StateOfCompletion StateOfCompletion { get; }
 
@@ -346,9 +346,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 		protected virtual IAdvancedDriverAssistantSystemsEngineering GetADS()
 		{
 			return _adasInputData ?? (_adasInputData = new JSONADASInputDataV7(this));
-        }
+		}
 
-        public virtual double InitialSOC
+		public virtual double InitialSOC
 		{
 			get { return double.NaN; }
 		}
@@ -509,7 +509,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			}
 		}
 
-        IPTOTransmissionInputData IVehicleComponentsEngineering.PTOTransmissionInputData
+		IPTOTransmissionInputData IVehicleComponentsEngineering.PTOTransmissionInputData
 		{
 			get { return _ptoInputData ?? (_ptoInputData = new JSONPTOTransmissioninputData(this)); }
 		}
@@ -520,7 +520,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 		}
 
 
-        IAxlesEngineeringInputData IVehicleComponentsEngineering.AxleWheels
+		IAxlesEngineeringInputData IVehicleComponentsEngineering.AxleWheels
 		{
 			get { return this; }
 		}
@@ -575,7 +575,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return DeclarationData.Vehicle.SleeperCabDefault; }
 		}
 
-		public virtual bool AirdragModifiedMultistage { get; }
+		public virtual bool? AirdragModifiedMultistage { get; }
 
 		public virtual TankSystem? TankSystem
 		{
@@ -608,7 +608,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return null; }
 		}
 
-		public virtual RegistrationClass RegisteredClass
+		public virtual RegistrationClass? RegisteredClass
 		{
 			get { return RegistrationClass.unknown; }
 		}
@@ -628,12 +628,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 			get { return 0.SI<CubicMeter>(); }
 		}
 
-		public virtual VehicleCode VehicleCode
+		public virtual VehicleCode? VehicleCode
 		{
-			get { return VehicleCode.NOT_APPLICABLE; }
+			get { return  VectoCommon.Models.VehicleCode.NOT_APPLICABLE; }
 		}
 
-		public virtual bool LowEntry { get { return false; } }
+		public virtual bool? LowEntry { get { return false; } }
 
 		IVehicleComponentsDeclaration IVehicleDeclarationInputData.Components
 		{
@@ -684,7 +684,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
 		}
 
 		public virtual XmlNode XMLSource { get { return null; } }
-    }
+	}
 
 
 
diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs
index a91a5cb824..7ff8899379 100644
--- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs
@@ -120,7 +120,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return GetString(XMLNames.Vehicle_VIN); }
 		}
 
-		public virtual LegislativeClass LegislativeClass
+		public virtual LegislativeClass? LegislativeClass
 		{
 			get { return GetString(XMLNames.Vehicle_LegislativeClass).ParseEnum<LegislativeClass>(); }
 		}
@@ -224,7 +224,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return XmlConvert.ToBoolean(GetString(XMLNames.Vehicle_SleeperCab)); }
 		}
 
-		public virtual bool AirdragModifiedMultistage { get; }
+		public virtual bool? AirdragModifiedMultistage { get; }
 
 		public virtual TankSystem? TankSystem
 		{
@@ -273,7 +273,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			}
 		}
 
-		public virtual RegistrationClass RegisteredClass
+		public virtual RegistrationClass? RegisteredClass
 		{
 			get { return RegistrationClass.unknown; }
 		}
@@ -293,12 +293,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return 0.SI<CubicMeter>(); }
 		}
 
-		public virtual VehicleCode VehicleCode
+		public virtual VehicleCode? VehicleCode
 		{
-			get { return VehicleCode.NOT_APPLICABLE; }
+			get { return VectoCommon.Models.VehicleCode.NOT_APPLICABLE; }
 		}
 
-		public virtual bool LowEntry
+		public virtual bool? LowEntry
 		{
 			get { return false; }
 		}
@@ -328,7 +328,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return null; }
 		}
 
-		public virtual ConsumerTechnology DoorDriveTechnology { get { return ConsumerTechnology.Unknown; } }
+		public virtual ConsumerTechnology? DoorDriveTechnology { get { return ConsumerTechnology.Unknown; } }
 		
 		public virtual StateOfCompletion StateOfCompletion { get; }
 
@@ -676,9 +676,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 
 		#region Overrides of XMLDeclarationVehicleDataProviderV10
 
-		public override LegislativeClass LegislativeClass
+		public override LegislativeClass? LegislativeClass
 		{
-			get { return LegislativeClass.M3; }
+			get { return VectoCommon.Models.LegislativeClass.M3; }
 		}
 
 		#endregion
@@ -815,12 +815,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return VehicleCategory.HeavyBusCompletedVehicle; }
 		}
 
-		public override RegistrationClass RegisteredClass
+		public override RegistrationClass? RegisteredClass
 		{
 			get { return RegistrationClassHelper.Parse(GetString(XMLNames.Vehicle_RegisteredClass)).First(); }
 		}
 
-		public override VehicleCode VehicleCode
+		public override VehicleCode? VehicleCode
 		{
 			get { return GetString(XMLNames.Vehicle_VehicleCode).ParseEnum<VehicleCode>(); }
 		}
@@ -883,7 +883,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 		#endregion
 
 		
-		public override bool LowEntry
+		public override bool? LowEntry
 		{
 			get { return GetBool(XMLNames.Bus_LowEntry); }
 		}
@@ -893,7 +893,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return GetDouble(XMLNames.Bus_EntranceHeight).SI<Meter>(); }
 		}
 
-		public override ConsumerTechnology DoorDriveTechnology
+		public override ConsumerTechnology? DoorDriveTechnology
 		{
 			get { return ConsumerTechnologyHelper.Parse(GetString(XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology)); }
 		}
@@ -1033,7 +1033,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 
 		public Meter EntranceHeight { get; }
 
-		public virtual ConsumerTechnology DoorDriveTechnology
+		public virtual ConsumerTechnology? DoorDriveTechnology
 		{
 			get { return ConsumerTechnology.Unknown; }
 		}
@@ -1051,7 +1051,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 
 		public string Identifier { get; }
 		public bool ExemptedVehicle { get; }
-		public LegislativeClass LegislativeClass { get; }
+		public LegislativeClass? LegislativeClass { get; }
 		public int NumberOfPassengersUpperDeck { get; }
 		public int NumberOfPassengersLowerDeck { get; }
 		public CubicMeter CargoVolume
@@ -1061,16 +1061,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 		public Kilogram CurbMassChassis { get; }
 		public bool VocationalVehicle { get; }
 		public bool SleeperCab { get; }
-		public bool AirdragModifiedMultistage { get; }
+		public bool? AirdragModifiedMultistage { get; }
 		public TankSystem? TankSystem { get; }
 
 		public bool HybridElectricHDV { get; }
 		public bool DualFuelVehicle { get; }
 		public Watt MaxNetPower1 { get; }
 		public Watt MaxNetPower2 { get; }
-		public RegistrationClass RegisteredClass { get; }
-		public VehicleCode VehicleCode { get; }
-		public bool LowEntry { get; }
+		public RegistrationClass? RegisteredClass { get; }
+		public VehicleCode? VehicleCode { get; }
+		public bool? LowEntry { get; }
 		public bool Articulated { get { return GetBool(XMLNames.Vehicle_Articulated); } }
 		public Meter Height { get; }
 		public Meter Length { get; }
@@ -1134,41 +1134,66 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 
 		private IAdvancedDriverAssistantSystemDeclarationInputData _adas;
 		
-
 		public XMLDeclarationInterimStageBusDataProviderV28(
-			IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) : base(jobData, xmlNode, sourceFile)
-		{
-			SourceType = DataSourceType.XMLEmbedded;
-		}
-		
-		public override XmlElement PTONode
+			IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) 
+			: base(jobData, xmlNode, sourceFile) { }
+
+		public override string Model
 		{
-			get { return null; }
+			get
+			{
+				return ElementExists(XMLNames.Component_Model)
+					? GetString(XMLNames.Component_Model) : null;
+			}
 		}
-		
-		public override LegislativeClass LegislativeClass
+
+		public override LegislativeClass? LegislativeClass
 		{
-			get { return GetString(XMLNames.Bus_LegislativeCategory).ParseEnum<LegislativeClass>(); }
+			get
+			{
+				return ElementExists(XMLNames.Bus_LegislativeCategory)
+					? GetString(XMLNames.Bus_LegislativeCategory).ParseEnum<LegislativeClass?>()
+					: null;
+			}
 		}
 		
 		public override Kilogram CurbMassChassis
 		{
-			get { return GetDouble(XMLNames.Bus_CorrectedActualMass).SI<Kilogram>(); }
+			get
+			{
+				return ElementExists(XMLNames.Bus_CorrectedActualMass)
+					? GetDouble(XMLNames.Bus_CorrectedActualMass).SI<Kilogram>()
+					: null;
+			}
 		}
 		
 		public override Kilogram GrossVehicleMassRating
 		{
-			get { return GetDouble(XMLNames.Vehicle_TPMLM).SI<Kilogram>(); }
+			get { 
+				return ElementExists(XMLNames.Vehicle_TPMLM)
+					? GetDouble(XMLNames.Vehicle_TPMLM).SI<Kilogram>()
+					: null;
+			}
 		}
 
-		public override bool AirdragModifiedMultistage
+		public override bool? AirdragModifiedMultistage
 		{
-			get { return GetBool(XMLNames.Bus_AirdragModifiedMultistage); }
+			get
+			{
+				return ElementExists(XMLNames.Bus_AirdragModifiedMultistage)
+					? GetBool(XMLNames.Bus_AirdragModifiedMultistage)
+					: (bool?)null;
+			}
 		}
 
-		public override RegistrationClass RegisteredClass
+		public override RegistrationClass? RegisteredClass
 		{
-			get { return RegistrationClassHelper.Parse(GetString(XMLNames.Vehicle_RegisteredClass)).First(); }
+			get
+			{
+				return ElementExists(XMLNames.Vehicle_RegisteredClass)
+					? RegistrationClassHelper.Parse(GetString(XMLNames.Vehicle_RegisteredClass)).First()
+					: (RegistrationClass?)null;
+			}
 		}
 
 		public override TankSystem? TankSystem
@@ -1186,6 +1211,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 		{
 			get
 			{
+				if (!ElementExists(XMLNames.Bus_NumberPassengersLowerDeck))
+					return 0;
 				var node = GetNode(XMLNames.Bus_NumberPassengersLowerDeck);
 				return XmlConvert.ToInt32(node.InnerText);
 			}
@@ -1195,44 +1222,79 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 		{
 			get
 			{
+				if (!ElementExists(XMLNames.Bus_NumberPassengersUpperDeck))
+					return 0;
 				var node = GetNode(XMLNames.Bus_NumberPassengersUpperDeck);
 				return XmlConvert.ToInt32(node.InnerText);
 			}
 		}
 
-		public override VehicleCode VehicleCode
+		public override VehicleCode? VehicleCode
 		{
-			get { return GetString(XMLNames.Vehicle_VehicleCode).ParseEnum<VehicleCode>(); }
+			get {
+				return ElementExists(XMLNames.Vehicle_VehicleCode)
+					? GetString(XMLNames.Vehicle_VehicleCode).ParseEnum<VehicleCode>()
+					: (VehicleCode?)null; }
 		}
 
-		public override bool LowEntry
+		public override bool? LowEntry
 		{
-			get { return GetBool(XMLNames.Bus_LowEntry); }
+			get 
+			{ 
+				return ElementExists(XMLNames.Bus_LowEntry) 
+					? GetBool(XMLNames.Bus_LowEntry)
+					: (bool?)null;
+			}
 		}
 
 		public override Meter Height
 		{
-			get { return GetDouble(XMLNames.Bus_HeighIntegratedBody).SI<Meter>(); }
+			get
+			{
+				return ElementExists(XMLNames.Bus_HeighIntegratedBody)
+					? GetDouble(XMLNames.Bus_HeighIntegratedBody).SI<Meter>()
+					: null;
+			}
 		}
 
 		public override Meter Length
 		{
-			get { return GetDouble(XMLNames.Bus_VehicleLength).SI<Meter>(); }
+			get
+			{
+				return ElementExists(XMLNames.Bus_VehicleLength)
+					? GetDouble(XMLNames.Bus_VehicleLength).SI<Meter>()
+					: null;
+			}
 		}
 
 		public override Meter Width
 		{
-			get { return GetDouble(XMLNames.Bus_VehicleWidth).SI<Meter>();}
+			get
+			{
+				return ElementExists(XMLNames.Bus_VehicleWidth)
+					? GetDouble(XMLNames.Bus_VehicleWidth).SI<Meter>()
+					: null;
+			}
 		}
 
 		public override Meter EntranceHeight
 		{
-			get { return GetDouble(XMLNames.Bus_EntranceHeight).SI<Meter>(); }
+			get
+			{
+				return ElementExists(XMLNames.Bus_EntranceHeight)
+					? GetDouble(XMLNames.Bus_EntranceHeight).SI<Meter>()
+					: null;
+			}
 		}
 
-		public override ConsumerTechnology DoorDriveTechnology
+		public override ConsumerTechnology? DoorDriveTechnology
 		{
-			get { return ConsumerTechnologyHelper.Parse(GetString(XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology)); }
+			get
+			{
+				return ElementExists(XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology)
+					? ConsumerTechnologyHelper.Parse(GetString(XMLNames.BusAux_PneumaticSystem_DoorDriveTechnology))
+					: (ConsumerTechnology?)null;
+			}
 		}
 
 
@@ -1250,9 +1312,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get
 			{
 				if (ExemptedVehicle)
-				{
 					return null;
-				}
 
 				return _componentNode ?? (_componentNode = GetNode(XMLNames.Vehicle_Components, required:false) as XmlElement);
 			}
@@ -1261,7 +1321,27 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 
 		public override IAdvancedDriverAssistantSystemDeclarationInputData ADAS
 		{
-			get { return _adas ?? (_adas = ADASReader.ADASInputData); }
+			get 
+			{
+				if(ADASNode != null)
+					return _adas ?? (_adas = ADASReader.ADASInputData);
+				return null;
+			}
+		}
+
+		public override IVehicleComponentsDeclaration Components
+		{
+			get 
+			{ 
+				if (ComponentNode == null)
+					return null;
+				return _components ?? (_components = ComponentReader.ComponentInputData);
+			}
+		}
+		
+		public override XmlElement PTONode
+		{
+			get { return null; }
 		}
 
 		public override StateOfCompletion StateOfCompletion
@@ -1269,10 +1349,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return StateOfCompletionHelper.Parse(GetString(XMLNames.Bus_StateOfCompletion)); }
 		}
 
-		protected override DataSourceType SourceType { get; }
 
 		#region Overrides of AbstractXMLResource
 
+		protected override DataSourceType SourceType
+		{
+			get { return DataSourceType.XMLFile; }
+		}
+		
 		protected override XNamespace SchemaNamespace
 		{
 			get { return NAMESPACE_URI; }
@@ -1293,13 +1377,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 		
 		public XMLDeclarationExemptedInterimStageBusDataProviderV28(IXMLDeclarationJobInputData jobData,
 			XmlNode xmlNode, string sourceFile)
-			: base(jobData, xmlNode, sourceFile)
-		{
-
-			SourceType = DataSourceType.XMLEmbedded;
-		}
+			: base(jobData, xmlNode, sourceFile) {}
 		
-		public override LegislativeClass LegislativeClass
+		public override LegislativeClass? LegislativeClass
 		{
 			get { return GetString(XMLNames.Bus_LegislativeCategory).ParseEnum<LegislativeClass>(); }
 		}
@@ -1314,7 +1394,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return GetDouble(XMLNames.Vehicle_TPMLM).SI<Kilogram>(); }
 		}
 		
-		public override RegistrationClass RegisteredClass
+		public override RegistrationClass? RegisteredClass
 		{
 			get { return RegistrationClassHelper.Parse(GetString(XMLNames.Vehicle_RegisteredClass)).First(); }
 		}
@@ -1337,12 +1417,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			}
 		}
 
-		public override VehicleCode VehicleCode
+		public override VehicleCode? VehicleCode
 		{
 			get { return GetString(XMLNames.Vehicle_VehicleCode).ParseEnum<VehicleCode>(); }
 		}
 
-		public override bool LowEntry
+		public override bool? LowEntry
 		{
 			get { return GetBool(XMLNames.Bus_LowEntry); }
 		}
@@ -1357,9 +1437,15 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return null; }
 		}
 
-		public override XmlElement ComponentNode { get{ return null; }}
+		public override XmlElement ComponentNode
+		{
+			get{ return null; }
+		}
 
-		protected override DataSourceType SourceType { get; }
+		public override IVehicleComponentsDeclaration Components
+		{
+			get { return null; }
+		}
 
 		#region Overrides of AbstractXMLResource
 
@@ -1368,6 +1454,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
 			get { return NAMESPACE_URI; }
 		}
 
+		protected override DataSourceType SourceType
+		{
+			get { return DataSourceType.XMLFile; }
+		}
+
+
 		#endregion
 	}
 }
diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs
index cd1dc4d1d0..0d9b712154 100644
--- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs
@@ -76,7 +76,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
 			get { return GetString(XMLNames.Vehicle_VIN); }
 		}
 
-		public virtual LegislativeClass LegislativeClass
+		public virtual LegislativeClass? LegislativeClass
 		{
 			get { return GetString(XMLNames.Vehicle_LegislativeClass).ParseEnum<LegislativeClass>(); }
 		}
@@ -129,9 +129,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
 			get { return false; }
 		}
 
-		public virtual bool AirdragModifiedMultistage
+		public virtual bool? AirdragModifiedMultistage
 		{
-			get { return false; }
+			get { return null; }
 		}
 
 		public TankSystem? TankSystem
@@ -169,18 +169,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
 			get { return null; }
 		}
 
-		public virtual RegistrationClass RegisteredClass { get { return RegistrationClass.unknown;} }
+		public virtual RegistrationClass? RegisteredClass { get { return RegistrationClass.unknown;} }
 		public virtual int NumberOfPassengersUpperDeck { get { return 0; } }
 		public virtual int NumberOfPassengersLowerDeck { get { return 0; } }
 		public CubicMeter CargoVolume { get; }
-		public virtual VehicleCode VehicleCode { get { return VehicleCode.NOT_APPLICABLE; } }
-		public virtual bool LowEntry { get { return false; } }
+		public virtual VehicleCode? VehicleCode { get { return VectoCommon.Models.VehicleCode.NOT_APPLICABLE; } }
+		public virtual bool? LowEntry { get { return false; } }
 		public virtual bool Articulated { get { return false; } }
 		
 
 		public virtual Meter Width { get { return null; } }
 		public virtual Meter EntranceHeight { get { return null; } }
-		public ConsumerTechnology DoorDriveTechnology { get { return ConsumerTechnology.Unknown; } }
+		public ConsumerTechnology? DoorDriveTechnology { get { return ConsumerTechnology.Unknown; } }
 		public virtual StateOfCompletion StateOfCompletion { get; }
 
 		IVehicleComponentsDeclaration IVehicleDeclarationInputData.Components
diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapterPrimaryBus.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapterPrimaryBus.cs
index 632e95fac8..6e247423b2 100644
--- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapterPrimaryBus.cs
+++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapterPrimaryBus.cs
@@ -195,7 +195,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
 						Constants.BusAuxiliaries.ElectricalConsumers.DoorsPerVehicleConsumer,
 						StringComparison.CurrentCultureIgnoreCase)).NumberInActualVehicle.ToDouble();
 
-                switch (vehicleData.DoorDriveTechnology)
+				switch (vehicleData.DoorDriveTechnology)
 				{
 					case ConsumerTechnology.Electrically:
 						return count;
@@ -205,7 +205,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
 						return 0;
 				}
 			}
-            if (mission.BusParameter.ElectricalConsumers.ContainsKey(consumer.ConsumerName)) {
+			if (mission.BusParameter.ElectricalConsumers.ContainsKey(consumer.ConsumerName)) {
 				return mission.BusParameter.ElectricalConsumers[consumer.ConsumerName];
 			}
 
diff --git a/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Pneumatics/PneumaticUserInputsConfig.cs b/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Pneumatics/PneumaticUserInputsConfig.cs
index 80f1e54e91..f64f58bb70 100644
--- a/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Pneumatics/PneumaticUserInputsConfig.cs
+++ b/VectoCore/VectoCore/Models/BusAuxiliaries/DownstreamModules/Impl/Pneumatics/PneumaticUserInputsConfig.cs
@@ -27,7 +27,7 @@ namespace TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.Pneumati
 		public ConsumerTechnology AirSuspensionControl { get; set; }
 
 		// pneumatic or electric
-		public ConsumerTechnology Doors { get; set; }
+		public ConsumerTechnology? Doors { get; set; }
 		public Meter KneelingHeight { get; set; }
 
 		//public bool RetarderBrake { get; set; }
diff --git a/VectoCore/VectoCore/Models/Declaration/CompletedBusSegments.cs b/VectoCore/VectoCore/Models/Declaration/CompletedBusSegments.cs
index d063760bb4..bfacbe4da7 100644
--- a/VectoCore/VectoCore/Models/Declaration/CompletedBusSegments.cs
+++ b/VectoCore/VectoCore/Models/Declaration/CompletedBusSegments.cs
@@ -11,7 +11,7 @@ using TUGraz.VectoCore.Configuration;
 
 namespace TUGraz.VectoCore.Models.Declaration
 {
-	public sealed class CompletedBusSegments : LookupData<int , VehicleCode, RegistrationClass, int, Meter, bool, Segment>
+	public sealed class CompletedBusSegments : LookupData<int , VehicleCode?, RegistrationClass?, int, Meter, bool?, Segment>
 	{
 		private const string COMPLETED_BUS_SEGMENTS_CSV = ".CompletedBusSegmentationTable.csv";
 
@@ -37,7 +37,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 			_segmentTable = table.Copy();
 		}
 
-		public override Segment Lookup(int numberOfAxles, VehicleCode vehicleCode, RegistrationClass registrationClass, int passengersLowerDeck, Meter bodyHeight, bool lowEntry)
+		public override Segment Lookup(int numberOfAxles, VehicleCode? vehicleCode, RegistrationClass? registrationClass, int passengersLowerDeck, Meter bodyHeight, bool? lowEntry)
 		{
 			return LookupCompletedBusVehicle(numberOfAxles, vehicleCode, registrationClass, passengersLowerDeck, bodyHeight, lowEntry);
 		}
@@ -46,7 +46,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 		#endregion
 
 
-		private Segment LookupCompletedBusVehicle(int numberOfAxles, VehicleCode vehicleCode, RegistrationClass registrationClass, int passengersLowerDeck, Meter bodyHeight, bool lowEntry)
+		private Segment LookupCompletedBusVehicle(int numberOfAxles, VehicleCode? vehicleCode, RegistrationClass? registrationClass, int passengersLowerDeck, Meter bodyHeight, bool? lowEntry)
 		{
 			var rows = _segmentTable.AsEnumerable().Where(
 				r => {
@@ -144,7 +144,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 							PassengerDensityRef = row.ParseDouble(missionType.ToString()).SI<PerSquareMeter>(),
 							AirDragMeasurementAllowed = row.ParseBoolean(missionType == MissionType.Interurban ? "airdragmeasurementinterurban" : "airdragmeasurement"),
 							ElectricalConsumers = GetVehicleEquipment(row),
-							DoubleDecker =  row.Field<string>("vehiclecode").ParseEnum<VehicleCode>().IsDoubleDeckerBus(),
+							DoubleDecker =  row.Field<string>("vehiclecode").ParseEnum<VehicleCode?>().IsDoubleDeckerBus(),
 							DeltaHeight = row.ParseDouble("deltaheight").SI<Meter>(),
 							SeparateAirDistributionDuctsHVACCfg = row.Field<string>("sepairdistrductshvaccfg").Split('/').Select(BusHVACSystemConfigurationHelper.Parse).ToArray() 
 						}
diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
index 0833e78d6e..1a19121b3c 100644
--- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
+++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs
@@ -278,7 +278,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 			}
 			 
 
-			public static Meter CalculateInternalLength(Meter vehicleLength, VehicleCode vehicleCode, double numPassLowFloor)
+			public static Meter CalculateInternalLength(Meter vehicleLength, VehicleCode? vehicleCode, double numPassLowFloor)
 				{
 				if (vehicleCode.GetFloorType()  == FloorType.LowFloor) {
 					return vehicleCode.IsDoubleDeckerBus() ? 2 * vehicleLength : vehicleLength;
@@ -295,12 +295,12 @@ namespace TUGraz.VectoCore.Models.Declaration
 			}
 
 			public static Meter CalculateLengthInteriorLights(
-				Meter vehicleLength, VehicleCode vehicleCode, double numPassLowFloor)
+				Meter vehicleLength, VehicleCode? vehicleCode, double numPassLowFloor)
 			{
 				return CalculateInternalLength(vehicleLength, vehicleCode, numPassLowFloor);
 			}
 
-			public static Meter CalculateInternalHeight(VehicleCode vehicleCode, RegistrationClass registrationClass, Meter bodyHeight)
+			public static Meter CalculateInternalHeight(VehicleCode? vehicleCode, RegistrationClass? registrationClass, Meter bodyHeight)
 			{
 				if (vehicleCode.IsDoubleDeckerBus()) {
 					return Constants.BusParameters.InternalHeightDoubleDecker;
@@ -359,9 +359,9 @@ namespace TUGraz.VectoCore.Models.Declaration
 						(coolingPwrDriver + coolingPwrPass);
 			}
 
-			public static Meter CorrectionLengthDrivetrainVolume(VehicleCode vehicleCode, bool lowEntry, int numAxles, bool articulated)
+			public static Meter CorrectionLengthDrivetrainVolume(VehicleCode? vehicleCode, bool? lowEntry, int numAxles, bool articulated)
 			{
-				if ((vehicleCode == VehicleCode.CE || vehicleCode == VehicleCode.CG) && !lowEntry) {
+				if ((vehicleCode == VehicleCode.CE || vehicleCode == VehicleCode.CG) && !(bool)lowEntry) {
 					switch (numAxles) {
 						case 2: return 1.0.SI<Meter>();
 						case 3: return articulated ? 1.0.SI<Meter>() : 1.25.SI<Meter>();
diff --git a/VectoCore/VectoCore/Models/Declaration/Mission.cs b/VectoCore/VectoCore/Models/Declaration/Mission.cs
index 6076de72b4..3b45a86d40 100644
--- a/VectoCore/VectoCore/Models/Declaration/Mission.cs
+++ b/VectoCore/VectoCore/Models/Declaration/Mission.cs
@@ -155,7 +155,7 @@ namespace TUGraz.VectoCore.Models.Declaration
 
 		public Meter DeltaHeight { get; internal set; }
 		public Meter EntranceHeight { get; set; }
-		public VehicleCode VehicleCode { get; set; }
+		public VehicleCode? VehicleCode { get; set; }
 		public FloorType FloorType { get; set; }
 		public IList<BusHVACSystemConfiguration> SeparateAirDistributionDuctsHVACCfg { get; set; }
 	}
diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs
index 70b76855ed..e6614f6a45 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs
@@ -78,7 +78,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
 	{
 		public string VIN { get; internal set; }
 
-		public LegislativeClass LegislativeClass { get; internal set; }
+		public LegislativeClass? LegislativeClass { get; internal set; }
 
 		public VehicleCategory VehicleCategory { get; internal set; }
 
@@ -251,8 +251,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
 		[JsonIgnore]
 		public IVehicleDeclarationInputData InputData { get; internal set; }
 
-		public RegistrationClass RegisteredClass { get; internal set; }
-		public VehicleCode VehicleCode { get; internal  set; }
+		public RegistrationClass? RegisteredClass { get; internal set; }
+		public VehicleCode? VehicleCode { get; internal  set; }
 
 
 		//		#region "Bus Parameters"
diff --git a/VectoCore/VectoCore/OutputData/XML/XMLVTPReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLVTPReport.cs
index 95c3ababe1..b7a177e314 100644
--- a/VectoCore/VectoCore/OutputData/XML/XMLVTPReport.cs
+++ b/VectoCore/VectoCore/OutputData/XML/XMLVTPReport.cs
@@ -79,7 +79,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 		private LoggingRule cycleChecksRule;
 
 		protected VehicleClass VehicleClass = VehicleClass.Unknown;
-		protected VehicleCode VehicleCode = VehicleCode.NOT_APPLICABLE;
+		protected VehicleCode? VehicleCode = VectoCommon.Models.VehicleCode.NOT_APPLICABLE;
 
 		//protected XNamespace di;
 		//private bool allSuccess = true;
diff --git a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs
index 9e7e900db8..ea9f79aa19 100644
--- a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs
+++ b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs
@@ -28,7 +28,7 @@ namespace TUGraz.VectoCore.Tests.Utils {
 		public string Identifier { get; }
 		public bool ExemptedVehicle { get; }
 		public string VIN { get; }
-		public LegislativeClass LegislativeClass { get; }
+		public LegislativeClass? LegislativeClass { get; }
 		public VehicleCategory VehicleCategory { get; }
 		public AxleConfiguration AxleConfiguration { get; }
 		public Kilogram CurbMassChassis { get; }
@@ -38,7 +38,7 @@ namespace TUGraz.VectoCore.Tests.Utils {
 		public PerSecond EngineIdleSpeed { get; }
 		public bool VocationalVehicle { get; }
 		public bool SleeperCab { get; }
-		public bool AirdragModifiedMultistage { get; }
+		public bool? AirdragModifiedMultistage { get; }
 		public TankSystem? TankSystem { get; }
 		public IAdvancedDriverAssistantSystemDeclarationInputData ADAS { get; }
 		public bool ZeroEmissionVehicle { get; }
@@ -46,18 +46,18 @@ namespace TUGraz.VectoCore.Tests.Utils {
 		public bool DualFuelVehicle { get; }
 		public Watt MaxNetPower1 { get; }
 		public Watt MaxNetPower2 { get; }
-		public RegistrationClass RegisteredClass { get; set; }
+		public RegistrationClass? RegisteredClass { get; set; }
 		public int NumberOfPassengersUpperDeck { get; set; }
 		public int NumberOfPassengersLowerDeck { get; set; }
 		public CubicMeter CargoVolume { get; }
-		public VehicleCode VehicleCode { get; set; }
-		public bool LowEntry { get; }
+		public VehicleCode? VehicleCode { get; set; }
+		public bool? LowEntry { get; }
 		public bool Articulated { get; }
 		public Meter Height { get; set; }
 		public Meter Length { get; set; }
 		public Meter Width { get; set; }
 		public Meter EntranceHeight { get; }
-		public ConsumerTechnology DoorDriveTechnology { get; }
+		public ConsumerTechnology? DoorDriveTechnology { get; }
 		public StateOfCompletion StateOfCompletion { get; }
 		public IVehicleComponentsDeclaration Components { get { return this; } }
 		public XmlNode XMLSource { get; }
@@ -112,15 +112,15 @@ namespace TUGraz.VectoCore.Tests.Utils {
 		public Meter Length { get; set; }
 		public Meter Width { get; set; }
 		public Meter EntranceHeight { get; }
-		public ConsumerTechnology DoorDriveTechnology { get; }
+		public ConsumerTechnology? DoorDriveTechnology { get; }
 		public StateOfCompletion StateOfCompletion { get; }
 		public Watt MaxNetPower2 { get; }
-		public RegistrationClass RegisteredClass { get; set; }
+		public RegistrationClass? RegisteredClass { get; set; }
 		public int NumberOfPassengersUpperDeck { get; set; }
 		public int NumberOfPassengersLowerDeck { get; set; }
 		public CubicMeter CargoVolume { get; }
-		public VehicleCode VehicleCode { get; set; }
-		public bool LowEntry { get; }
+		public VehicleCode? VehicleCode { get; set; }
+		public bool? LowEntry { get; }
 
 		IVehicleComponentsDeclaration IVehicleDeclarationInputData.Components
 		{
@@ -133,7 +133,7 @@ namespace TUGraz.VectoCore.Tests.Utils {
 		public string Identifier { get; }
 		public bool ExemptedVehicle { get; }
 		public string VIN { get; }
-		public LegislativeClass LegislativeClass { get; }
+		public LegislativeClass? LegislativeClass { get; }
 		public VehicleCategory VehicleCategory { get; }
 		public AxleConfiguration AxleConfiguration { get; }
 		public Kilogram CurbMassChassis { get; }
@@ -143,7 +143,7 @@ namespace TUGraz.VectoCore.Tests.Utils {
 		public PerSecond EngineIdleSpeed { get; }
 		public bool VocationalVehicle { get; }
 		public bool SleeperCab { get; }
-		public bool AirdragModifiedMultistage { get; }
+		public bool? AirdragModifiedMultistage { get; }
 		public TankSystem? TankSystem { get; }
 
 		IAdvancedDriverAssistantSystemDeclarationInputData IVehicleDeclarationInputData.ADAS
diff --git a/VectoCore/VectoCoreTest/XML/XMLMultistageBusDataTest.cs b/VectoCore/VectoCoreTest/XML/XMLMultistageBusDataTest.cs
index 694a871d0a..70ca58ce8f 100644
--- a/VectoCore/VectoCoreTest/XML/XMLMultistageBusDataTest.cs
+++ b/VectoCore/VectoCoreTest/XML/XMLMultistageBusDataTest.cs
@@ -562,13 +562,37 @@ namespace TUGraz.VectoCore.Tests.XML
 			Assert.AreEqual("VEH-1234567890", vehicleData.VIN);
 			Assert.AreEqual(DateTime.Parse("2018-02-15T11:00:00Z").ToUniversalTime(), vehicleData.Date);
 			Assert.AreEqual(StateOfCompletion.incomplete, vehicleData.StateOfCompletion);
+			TestEmptyInterimStageInputFields(vehicleData);
+		}
+
+		private void TestEmptyInterimStageInputFields(IVehicleDeclarationInputData vehicleData)
+		{
+			Assert.AreEqual(null, vehicleData.Model);
+			Assert.AreEqual(null, vehicleData.LegislativeClass);			
+			Assert.AreEqual(null, vehicleData.CurbMassChassis);
+			Assert.AreEqual(null, vehicleData.GrossVehicleMassRating);
+			Assert.AreEqual(null, vehicleData.AirdragModifiedMultistage);
+			Assert.AreEqual(null, vehicleData.TankSystem);
+			Assert.AreEqual(null, vehicleData.RegisteredClass);
+			Assert.AreEqual(0, vehicleData.NumberOfPassengersLowerDeck);
+			Assert.AreEqual(0, vehicleData.NumberOfPassengersUpperDeck);
+			Assert.AreEqual(null, vehicleData.VehicleCode);
+			Assert.AreEqual(null, vehicleData.LowEntry);
+			Assert.AreEqual(null, vehicleData.Height);
+			Assert.AreEqual(null, vehicleData.Length);
+			Assert.AreEqual(null, vehicleData.Width);
+			Assert.AreEqual(null, vehicleData.EntranceHeight);
+			Assert.AreEqual(null, vehicleData.DoorDriveTechnology);
+
+			Assert.AreEqual(null, vehicleData.ADAS);
+			Assert.AreEqual(null, vehicleData.Components);
 		}
-
+		
 		#endregion
 
 
 		#region Test manufacturing Stage 2
-		
+
 		private void TestManufacturingStag02(IManufacturingStageInputData manufacturingStage)
 		{
 			Assert.AreEqual(3, manufacturingStage.StageCount);
-- 
GitLab