diff --git a/VectoCore/FileIO/DeclarationFile/VehicleFileDecl.cs b/VectoCore/FileIO/DeclarationFile/VehicleFileDecl.cs index 72cf89f0680851cad8f83b5892504c056bcdd774..5744f639b01b831b17e2655602b570800e8c75cd 100644 --- a/VectoCore/FileIO/DeclarationFile/VehicleFileDecl.cs +++ b/VectoCore/FileIO/DeclarationFile/VehicleFileDecl.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using Newtonsoft.Json; +using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.SimulationComponent.Data; namespace TUGraz.VectoCore.FileIO.DeclarationFile { - internal class VehicleFileV5Declaration { [JsonProperty(Required = Required.Always)] public JsonDataHeader Header; diff --git a/VectoCore/FileIO/VehicleFileDeclaration.cs b/VectoCore/FileIO/VehicleFileDeclaration.cs deleted file mode 100644 index 7b74a9067ac14220744dc07ce1693f0fe90e198d..0000000000000000000000000000000000000000 --- a/VectoCore/FileIO/VehicleFileDeclaration.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.Collections.Generic; -using Newtonsoft.Json; -using TUGraz.VectoCore.Models.Declaration; -using TUGraz.VectoCore.Models.SimulationComponent.Data; - -namespace TUGraz.VectoCore.FileIO -{ -// public class VehicleFileDeclaration -// { - - public class VehicleFileV5Declaration - { - [JsonProperty(Required = Required.Always)] public JsonDataHeader Header; - [JsonProperty(Required = Required.Always)] public DataBodyDecl Body; - - //public void SetProperties(VehicleData vehicleData) - //{ - // vehicleData.AxleConfiguration = AxleConfiguration.AxleConfig4x2; - - // vehicleData.Retarder = new RetarderData(Body.Retarder, vehicleData.BasePath); - - // vehicleData.AxleData = new List<VehicleData.Axle>(Body.AxleConfig.Axles.Count); - // var RRC = 0.0; - // var mRed0 = 0.SI<Kilogram>(); - // foreach (var axleData in Body.AxleConfig.Axles) { - // var axle = new VehicleData.Axle(axleData); - // if (axle.RollResistanceCoefficient < 0) { - // throw new VectoException("Axle roll resistance coefficient < 0"); - // } - // if (axle.TyreTestLoad <= 0) { - // throw new VectoException("Axle tyre test load (FzISO) must be greater than 0!"); - // } - // var nrWheels = axle.TwinTyres ? 4 : 2; - // RRC += axle.AxleWeightShare * axle.RollResistanceCoefficient * - // Math.Pow( - // (axle.AxleWeightShare * vehicleData.TotalVehicleWeight() * Physics.GravityAccelleration / axle.TyreTestLoad / - // nrWheels).Double(), Physics.RollResistanceExponent - 1); - // mRed0 += nrWheels * (axle.Inertia / vehicleData.DynamicTyreRadius / vehicleData.DynamicTyreRadius).Cast<Kilogram>(); - - // vehicleData._axleData.Add(axle); - // } - // vehicleData.TotalRollResistanceCoefficient = RRC; - // vehicleData.ReducedMassWheels = mRed0; - - // vehicleData.VehicleCategory = Enum.Parse(typeof (VehicleCategory), Body.VehicleCategoryStr, true); - - - // //switch (Body.CrossWindCorrectionModeStr) { - // // case "CdOfBeta": - // // vehicleData._crossWindCorrectionMode = CrossWindCorrectionMode.VAirBeta; - // // break; - // // case "CdOfV": - // // vehicleData._crossWindCorrectionMode = CrossWindCorrectionMode.SpeedDependent; - // // break; - // // default: - // // vehicleData._crossWindCorrectionMode = CrossWindCorrectionMode.NoCorrection; - // // break; - // //} - //} - - public class DataBodyDecl - { - [JsonProperty("SavedInDeclMode", Required = Required.Always)] public bool SavedInDeclarationMode; - - [JsonProperty("VehCat", Required = Required.Always)] public string VehicleCategoryStr; - - public VehicleCategory VehicleCategory() - { - return (VehicleCategory)Enum.Parse(typeof(VehicleCategory), VehicleCategoryStr, true); - } - - [JsonProperty(Required = Required.Always)] public double CurbWeight; - - //[JsonProperty] - //public double CurbWeightExtra; - - //[JsonProperty] - //public double Loading; - - [JsonProperty("MassMax", Required = Required.Always)] public double GrossVehicleMassRating; - - [JsonProperty("Cd", Required = Required.Always)] public double DragCoefficient; - - [JsonProperty("CrossSecArea", Required = Required.Always)] public double CrossSectionArea; - - [JsonProperty("Cd2")] public double DragCoefficientRigidTruck; // without trailer - - [JsonProperty("CrossSecArea2")] public double CrossSectionAreaRigidTruck; - - - //[JsonProperty("rdyn")] - //public double DynamicTyreRadius; - - [JsonProperty("Rim", Required = Required.Always)] public string RimStr; - - //[JsonProperty("CdCorrMode")] - //public string CrossWindCorrectionModeStr; - - //[JsonProperty("CdCorrFile")] - //public string CrossWindCorrectionFile; - - [JsonProperty("Retarder", Required = Required.Always)] public RetarderData.Data Retarder; - - [JsonProperty(Required = Required.Always)] public AxleConfigData AxleConfig; - - - public class AxleConfigData - { - [JsonProperty("Type", Required = Required.Always)] public string TypeStr; - [JsonProperty(Required = Required.Always)] public IList<AxleDataDecl> Axles; - } - - public class AxleDataDecl - { - //[JsonProperty] - //public double Inertia; - [JsonProperty("Wheels", Required = Required.Always)] public string WheelsStr; - //[JsonProperty(Required = Required.Always)] - //public double AxleWeightShare; - [JsonProperty(Required = Required.Always)] public bool TwinTyres; - [JsonProperty("RRCISO", Required = Required.Always)] public double RollResistanceCoefficient; - [JsonProperty("FzISO", Required = Required.Always)] public double TyreTestLoad; - } - } - } - -// } -} \ No newline at end of file diff --git a/VectoCore/FileIO/VehicleFileEngineering.cs b/VectoCore/FileIO/VehicleFileEngineering.cs deleted file mode 100644 index 5d987e4e464d4b9dbafe9f017df8b61d80cb3147..0000000000000000000000000000000000000000 --- a/VectoCore/FileIO/VehicleFileEngineering.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TUGraz.VectoCore.FileIO -{ -// class VehicleFileEngineering -// { - - public class VehicleFileV5Engineering : VehicleFileV5Declaration - { -// [JsonProperty(Required = Required.Always)] public JsonDataHeader Header; - [JsonProperty(Required = Required.Always)] public new DataBodyEng Body; - - //public void SetProperties(VehicleData vehicleData) - //{ - // vehicleData._axleConfiguration = VehicleData.AxleConfiguration.AxleConfig4x2; - - // vehicleData._retarder = new RetarderData(Body.Retarder, vehicleData.BasePath); - - // vehicleData._axleData = new List<VehicleData.Axle>(Body.AxleConfig.Axles.Count); - // var RRC = 0.0; - // var mRed0 = 0.SI<Kilogram>(); - // foreach (var axleData in Body.AxleConfig.Axles) { - // var axle = new VehicleData.Axle(axleData); - // if (axle.RollResistanceCoefficient < 0) { - // throw new VectoException("Axle roll resistance coefficient < 0"); - // } - // if (axle.TyreTestLoad <= 0) { - // throw new VectoException("Axle tyre test load (FzISO) must be greater than 0!"); - // } - // var nrWheels = axle.TwinTyres ? 4 : 2; - // RRC += axle.AxleWeightShare * axle.RollResistanceCoefficient * - // Math.Pow( - // (axle.AxleWeightShare * vehicleData.TotalVehicleWeight() * Physics.GravityAccelleration / axle.TyreTestLoad / - // nrWheels).Double(), Physics.RollResistanceExponent - 1); - // mRed0 += nrWheels * (axle.Inertia / vehicleData.DynamicTyreRadius / vehicleData.DynamicTyreRadius).Cast<Kilogram>(); - - // vehicleData._axleData.Add(axle); - // } - // vehicleData.TotalRollResistanceCoefficient = RRC; - // vehicleData.ReducedMassWheels = mRed0; - - // switch (Body.VehicleCategoryStr) { - // case "RigidTruck": - // vehicleData.Category = VehicleData.VehicleCategory.RigidTruck; - // break; - // case "Tractor": - // vehicleData.Category = VehicleData.VehicleCategory.Tractor; - // break; - // case "CityBus": - // vehicleData.Category = VehicleData.VehicleCategory.CityBus; - // break; - // case "InterurbanBus": - // vehicleData.Category = VehicleData.VehicleCategory.InterurbanBus; - // break; - // case "Coach": - // vehicleData.Category = VehicleData.VehicleCategory.Coach; - // break; - // } - - // switch (Body.CrossWindCorrectionModeStr) { - // case "CdOfBeta": - // vehicleData._crossWindCorrectionMode = VehicleData.CrossWindCorrectionMode.VAirBeta; - // break; - // case "CdOfV": - // vehicleData._crossWindCorrectionMode = VehicleData.CrossWindCorrectionMode.SpeedDependent; - // break; - // default: - // vehicleData._crossWindCorrectionMode = VehicleData.CrossWindCorrectionMode.NoCorrection; - // break; - // } - //} - - public class DataBodyEng : DataBodyDecl - { - //[JsonProperty("SavedInDeclMode")] public bool SavedInDeclarationMode; - - //[JsonProperty("VehCat", Required = Required.Always)] public string VehicleCategoryStr; - - //[JsonProperty(Required = Required.Always)] public double CurbWeight; - - [JsonProperty] public double CurbWeightExtra; - - [JsonProperty] public double Loading; - - //[JsonProperty("MassMax", Required = Required.Always)] public double GrossVehicleMassRating; - - //[JsonProperty("Cd2")] public double DragCoefficientRigidTruck; // without trailer - - //[JsonProperty("CrossSecArea2")] public double CrossSectionAreaRigidTruck; - - //[JsonProperty("Cd", Required = Required.Always)] public double DragCoefficient; - - //[JsonProperty("CrossSecArea", Required = Required.Always)] public double CrossSectionArea; - - [JsonProperty("rdyn")] public double DynamicTyreRadius; - - //[JsonProperty("Rim")] public string RimStr; - - [JsonProperty("CdCorrMode")] public string CrossWindCorrectionModeStr; - - [JsonProperty("CdCorrFile")] public string CrossWindCorrectionFile; - - //[JsonProperty("Retarder", Required = Required.Always)] public RetarderData.Data Retarder; - - [JsonProperty(Required = Required.Always)] public new AxleConfigData AxleConfig; - - - public new class AxleConfigData - { - [JsonProperty("Type", Required = Required.Always)] public string TypeStr; - [JsonProperty(Required = Required.Always)] public IList<AxleDataEng> Axles; - } - - public class AxleDataEng : AxleDataDecl - { - [JsonProperty] public double Inertia; -// [JsonProperty] public string WheelsStr; - [JsonProperty] public double AxleWeightShare; -// [JsonProperty(Required = Required.Always)] public bool TwinTyres; -// [JsonProperty("RRCISO", Required = Required.Always)] public double RollResistanceCoefficient; -// [JsonProperty("FzISO", Required = Required.Always)] public double TyreTestLoad; - } - } - } -} - -//} \ No newline at end of file diff --git a/VectoCore/Models/Declaration/AxleConfiguration.cs b/VectoCore/Models/Declaration/AxleConfiguration.cs index b7d26a130d2ff94e5e0480cecce8b08692e7576f..592bfdb659526b4528fed98f631ceab3a7afa61f 100644 --- a/VectoCore/Models/Declaration/AxleConfiguration.cs +++ b/VectoCore/Models/Declaration/AxleConfiguration.cs @@ -2,15 +2,15 @@ namespace TUGraz.VectoCore.Models.Declaration { public enum AxleConfiguration { - AxleConfig4x2, - AxleConfig4x4, - AxleConfig6x2, - AxleConfig6x4, - AxleConfig6x6, - AxleConfig8x2, - AxleConfig8x4, - AxleConfig8x6, - AxleConfig8x8, + AxleConfig_4x2, + AxleConfig_4x4, + AxleConfig_6x2, + AxleConfig_6x4, + AxleConfig_6x6, + AxleConfig_8x2, + AxleConfig_8x4, + AxleConfig_8x6, + AxleConfig_8x8, } public static class AxleConfigurationExtensions diff --git a/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs b/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs index cf5426ad35b5fe8f8e1074db591f213f64461e65..1dd43f3778c4dca40a7267af6b62a51bc49dd542 100644 --- a/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs +++ b/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs @@ -201,9 +201,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl _auxDict[auxID] = AuxiliaryData.ReadFromFile(auxFileName); } - public void AddDriver(VectoJobData.Data.DataBody.StartStopData startStop, - VectoJobData.Data.DataBody.OverSpeedEcoRollData overSpeedEcoRoll, - VectoJobData.Data.DataBody.LACData lookAheadCoasting, string accelerationLimitingFile) + public void AddDriver(VectoJobData.StartStopData startStop, + VectoJobData.OverSpeedEcoRollData overSpeedEcoRoll, + VectoJobData.LACData lookAheadCoasting, string accelerationLimitingFile) { if (_engineOnly) { return; diff --git a/VectoCore/Models/SimulationComponent/Data/VehicleData.cs b/VectoCore/Models/SimulationComponent/Data/VehicleData.cs index 3fe762eef1f8cdf34e527c97519e7f5810f76f22..26b7bad51a5f8897db6262c99619737ebec03b6e 100644 --- a/VectoCore/Models/SimulationComponent/Data/VehicleData.cs +++ b/VectoCore/Models/SimulationComponent/Data/VehicleData.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.FileIO; +using TUGraz.VectoCore.FileIO.DeclarationFile; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Utils; @@ -50,7 +51,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data // SetGenericData(data.Body); //} - protected void SetGenericData(VehicleFileV5Declaration.DataBodyDecl data) + internal void SetGenericData(VehicleFileV5Declaration.DataBodyDecl data) { SavedInDeclarationMode = data.SavedInDeclarationMode; VehicleCategory = data.VehicleCategory(); diff --git a/VectoCore/Models/SimulationComponent/Factories/DeclarationModeFactory.cs b/VectoCore/Models/SimulationComponent/Factories/DeclarationModeFactory.cs index a54ef5873cc63e130afbd11fa4ca7a34e696e80e..aff10521a8f2afc907a972a1f7df1ec107c18a7e 100644 --- a/VectoCore/Models/SimulationComponent/Factories/DeclarationModeFactory.cs +++ b/VectoCore/Models/SimulationComponent/Factories/DeclarationModeFactory.cs @@ -2,6 +2,7 @@ using System.IO; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.FileIO; +using TUGraz.VectoCore.FileIO.DeclarationFile; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; @@ -37,7 +38,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Factories } } - protected VehicleData CreateVehicleData(string basePath, VehicleFileV5Declaration data) + internal VehicleData CreateVehicleData(string basePath, VehicleFileV5Declaration data) { //return new VehicleData { // SavedInDeclarationMode = data.SavedInDeclarationMode, diff --git a/VectoCore/Models/SimulationComponent/Factories/EngineeringModeFactory.cs b/VectoCore/Models/SimulationComponent/Factories/EngineeringModeFactory.cs index 786d0279312d8689a384b5fc0afa7d5054186ce3..a92a141fcb23c246f6db2bc4bc6b28719c939938 100644 --- a/VectoCore/Models/SimulationComponent/Factories/EngineeringModeFactory.cs +++ b/VectoCore/Models/SimulationComponent/Factories/EngineeringModeFactory.cs @@ -3,6 +3,7 @@ using System.Linq; using Newtonsoft.Json; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.FileIO; +using TUGraz.VectoCore.FileIO.EngineeringFile; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Utils; @@ -40,7 +41,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Factories } - protected VehicleData CreateVehicleData(string basePath, VehicleFileV5Engineering.DataBodyEng data) + internal VehicleData CreateVehicleData(string basePath, VehicleFileV5Engineering.DataBodyEng data) { return new VehicleData { BasePath = basePath, diff --git a/VectoCore/Models/SimulationComponent/Factories/Impl/DeclarationModeSimulationComponentFactory.cs b/VectoCore/Models/SimulationComponent/Factories/Impl/DeclarationModeSimulationComponentFactory.cs index 022c1b387021a8e6d515b67d0a6374a8d7024a04..8c74a62d53fed1d6761bb5518b699ad1d5febc0b 100644 --- a/VectoCore/Models/SimulationComponent/Factories/Impl/DeclarationModeSimulationComponentFactory.cs +++ b/VectoCore/Models/SimulationComponent/Factories/Impl/DeclarationModeSimulationComponentFactory.cs @@ -5,6 +5,7 @@ using Newtonsoft.Json; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.FileIO; using TUGraz.VectoCore.FileIO.DeclarationFile; +using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Utils; @@ -52,16 +53,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Factories.Impl { var fileInfo = GetFileVersion(json); - if (!fileInfo.Item2) { + if (!fileInfo.SavedInDeclarationMode) { throw new VectoException("File not saved in Declaration Mode!"); } - switch (fileInfo.Item1) { + switch (fileInfo.Version) { case 5: var data = JsonConvert.DeserializeObject<VehicleFileV5Declaration>(json); return CreateVehicleData(data.Body, basePath); default: - throw new UnsupportedFileVersionException("Unsupported Version of .vveh file. Got Version " + fileInfo.Item1); + throw new UnsupportedFileVersionException("Unsupported Version of .vveh file. Got Version " + fileInfo.Version); } } @@ -101,7 +102,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Factories.Impl RollResistanceCoefficient = axle.RollResistanceCoefficient, //AxleWeightShare = axle.AxleWeightShare, TyreTestLoad = DoubleExtensionMethods.SI<Newton>(axle.TyreTestLoad), - Wheels = axle.WheelsStr + //Wheels = axle.WheelsStr }).ToList() }; diff --git a/VectoCore/Models/SimulationComponent/Factories/Impl/EngineeringModeSimulationComponentFactory.cs b/VectoCore/Models/SimulationComponent/Factories/Impl/EngineeringModeSimulationComponentFactory.cs index b4d8b3aeb14899461ffc5836852137763212ba40..118f17414de6e207cf26037ad151ef8deb4c7800 100644 --- a/VectoCore/Models/SimulationComponent/Factories/Impl/EngineeringModeSimulationComponentFactory.cs +++ b/VectoCore/Models/SimulationComponent/Factories/Impl/EngineeringModeSimulationComponentFactory.cs @@ -6,6 +6,7 @@ using Newtonsoft.Json; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.FileIO; using TUGraz.VectoCore.FileIO.EngineeringFile; +using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Utils; @@ -26,16 +27,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Factories.Impl public VectoJobData ReadVectoJobJson(string json, string basePath) { var fileInfo = GetFileVersion(json); - if (fileInfo.Item2) { + if (fileInfo.SavedInDeclarationMode) { Log.WarnFormat("File was saved in Declaration Mode but is used for Engineering Mode!"); } - switch (fileInfo.Item1) { + switch (fileInfo.Version) { case 2: var data = JsonConvert.DeserializeObject<VectoJobFileV2Engineering>(json); return CreateVectoJobData(data, basePath); default: - throw new UnsupportedFileVersionException("Unsupported Version of .vecto file. Got Version" + fileInfo.Item1); + throw new UnsupportedFileVersionException("Unsupported Version of .vecto file. Got Version" + fileInfo.Version); } } @@ -50,16 +51,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Factories.Impl { var fileInfo = GetFileVersion(json); - if (fileInfo.Item2) { + if (fileInfo.SavedInDeclarationMode) { Log.WarnFormat("File was saved in Declaration Mode but is used for Engineering Mode!"); } - switch (fileInfo.Item1) { + switch (fileInfo.Version) { case 5: var data = JsonConvert.DeserializeObject<VehicleFileV5Engineering>(json); return CreateVehicleData(data.Body, basePath); default: - throw new UnsupportedFileVersionException("Unsupported Version of .vveh file. Got Version " + fileInfo.Item1); + throw new UnsupportedFileVersionException("Unsupported Version of .vveh file. Got Version " + fileInfo.Version); } } @@ -106,7 +107,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Factories.Impl RollResistanceCoefficient = axle.RollResistanceCoefficient, AxleWeightShare = axle.AxleWeightShare, TyreTestLoad = DoubleExtensionMethods.SI<Newton>(axle.TyreTestLoad), - Wheels = axle.WheelsStr + //Wheels = axle.WheelsStr }).ToList() }; } diff --git a/VectoCore/VectoCore.csproj b/VectoCore/VectoCore.csproj index 02d81f8265b581bdf96175ab6c46290d536bce35..2202583e3d06c174ba0e2b4ae4631890ae4d7398 100644 --- a/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore.csproj @@ -108,9 +108,11 @@ <ItemGroup> <Compile Include="Exceptions\VectoExceptions.cs" /> <Compile Include="Exceptions\VectoSimulationException.cs" /> + <Compile Include="FileIO\DeclarationFile\JobFileDecl.cs" /> + <Compile Include="FileIO\DeclarationFile\VehicleFileDecl.cs" /> + <Compile Include="FileIO\EngineeringFile\JobFileEng.cs" /> + <Compile Include="FileIO\EngineeringFile\VehicleFileEng.cs" /> <Compile Include="FileIO\InputFileReader.cs" /> - <Compile Include="FileIO\VehicleFileDeclaration.cs" /> - <Compile Include="FileIO\VehicleFileEngineering.cs" /> <Compile Include="Models\Connector\Ports\IDriverDemandPort.cs" /> <Compile Include="Models\Connector\Ports\IDriverDemandProvider.cs" /> <Compile Include="Models\Connector\Ports\IDrivingCycleDemandPort.cs" /> @@ -131,6 +133,10 @@ <Compile Include="Models\Declaration\DeclarationWheels.cs" /> <Compile Include="Models\Declaration\Mission.cs" /> <Compile Include="Models\Declaration\MissionType.cs" /> + <Compile Include="Models\SimulationComponent\Factories\Impl\DeclarationModeSimulationComponentFactory.cs" /> + <Compile Include="Models\SimulationComponent\Factories\Impl\EngineeringModeSimulationComponentFactory.cs" /> + <Compile Include="Models\SimulationComponent\Factories\ISimulationDataFactory.cs" /> + <Compile Include="Models\SimulationComponent\Factories\SimulationDataFactory.cs" /> <Compile Include="Utils\RessourceHelper.cs" /> <Compile Include="Models\Declaration\Segment.cs" /> <Compile Include="Models\Declaration\DeclarationSegments.cs" /> diff --git a/VectoCoreTest/Models/DeclarationDataTest.cs b/VectoCoreTest/Models/DeclarationDataTest.cs index 7e1e4ece1366d09229a3cf09635b276fe1ff2ac7..be86a3b650d8bf59fb5255144a553d0abde6c4cc 100644 --- a/VectoCoreTest/Models/DeclarationDataTest.cs +++ b/VectoCoreTest/Models/DeclarationDataTest.cs @@ -112,7 +112,7 @@ namespace TUGraz.VectoCore.Tests.Models new { Mission = MissionType.Interurban, Base = 0, LED = 0 }, new { Mission = MissionType.Coach, Base = 0, LED = 0 } }; - Assert.AreEqual(expected.Length, Enum.GetValues(typeof(MissionType)).Length); + Assert.AreEqual(expected.Length, Enum.GetValues(typeof (MissionType)).Length); foreach (var expectation in expected) { var baseConsumption = es.Lookup(expectation.Mission, technologies: new string[] { }); @@ -163,7 +163,7 @@ namespace TUGraz.VectoCore.Tests.Models //mock vehicleData var vehicleData = new { VehicleCategory = VehicleCategory.RigidTruck, - AxleConfiguration = AxleConfiguration.AxleConfig4x2, + AxleConfiguration = AxleConfiguration.AxleConfig_4x2, GrossVehicleMassRating = 11900.SI<Kilogram>(), CurbWeight = 5850.SI<Kilogram>() };