diff --git a/VectoCore/InputData/FileIO/DeclarationFile/EngineFileDecl.cs b/VectoCore/InputData/FileIO/DeclarationFile/EngineFileDecl.cs deleted file mode 100644 index 4d979e2a22731513a62bf425ec56403f893647f9..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/DeclarationFile/EngineFileDecl.cs +++ /dev/null @@ -1,95 +0,0 @@ -using Newtonsoft.Json; - -namespace TUGraz.VectoCore.InputData.FileIO.DeclarationFile -{ - /// <summary> - /// Represents the CombustionEngineData. Fileformat: .veng - /// </summary> - /// <code> - /// { - /// "Header": { - /// "CreatedBy": " ()", - /// "Date": "3/4/2015 12:26:24 PM", - /// "AppVersion": "2.0.4-beta3", - /// "FileVersion": 2 - /// }, - /// "Body": { - /// "SavedInDeclMode": false, - /// "ModelName": "Generic 24t Coach", - /// "Displacement": 12730.0, - /// "IdlingSpeed": 560.0, - /// "Inertia": 3.8, - /// "FullLoadCurves": [ - /// { - /// "Path": "24t Coach.vfld", - /// "Gears": "0 - 99" - /// } - /// ], - /// "FuelMap": "24t Coach.vmap", - /// "WHTC-Urban": 0.0, - /// "WHTC-Rural": 0.0, - /// "WHTC-Motorway": 0.0 - /// } - /// } - /// </code> - //internal class EngineFileV3Declaration : VectoEngineFile - //{ - // [JsonProperty(Required = Required.Always)] public JsonDataHeader Header; - // [JsonProperty(Required = Required.Always)] public DataBodyDecl Body; - - // public class DataBodyDecl - // { - // [JsonProperty("SavedInDeclMode", Required = Required.Always)] public bool SavedInDeclarationMode; - - // /// <summary> - // /// Model. Free text defining the engine model, type, etc. - // /// </summary> - // [JsonProperty(Required = Required.Always)] public string ModelName; - - // /// <summary> - // /// [ccm] Displacement in cubic centimeter. - // /// Used in Declaration Mode to calculate inertia. - // /// </summary> - // [JsonProperty(Required = Required.Always)] public double Displacement; - - // /// <summary> - // /// [rpm] Idling Engine Speed - // /// Low idle, applied in simulation for vehicle standstill in neutral gear position. - // /// </summary> - // [JsonProperty("IdlingSpeed", Required = Required.Always)] public double IdleSpeed; - - // //[JsonProperty(Required = Required.Always)] public IList<DataFullLoadCurve> FullLoadCurves; - // [JsonProperty(Required = Required.Always)] public string FullLoadCurve; - - // /// <summary> - // /// The Fuel Consumption Map is used to calculate the base Fuel Consumption (FC) value. - // /// </summary> - // [JsonProperty(Required = Required.Always)] public string FuelMap; - - // /// <summary> - // /// [g/kWh] The WHTC test results are required in Declaration Mode for the motorway WHTC FC Correction. - // /// </summary> - // [JsonProperty("WHTC-Motorway")] public double WHTCMotorway; - - // /// <summary> - // /// [g/kWh] The WHTC test results are required in Declaration Mode for the rural WHTC FC Correction. - // /// </summary> - // [JsonProperty("WHTC-Rural")] public double WHTCRural; - - // /// <summary> - // /// [g/kWh] The WHTC test results are required in Declaration Mode for the urban WHTC FC Correction. - // /// </summary> - // [JsonProperty("WHTC-Urban")] public double WHTCUrban; - - // /// <summary> - // /// Multiple Full Load and Drag Curves (.vfld) can be defined and assigned to different gears. - // /// GearData "0" must be assigned for idling and Engine Only Mode. - // /// </summary> - // public class DataFullLoadCurve - // { - // [JsonProperty(Required = Required.Always)] public string Gears; - // [JsonProperty(Required = Required.Always)] public string Path; - // } - // } - //} -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/DeclarationFile/GearboxFileDecl.cs b/VectoCore/InputData/FileIO/DeclarationFile/GearboxFileDecl.cs deleted file mode 100644 index 137199cf7b6dc3164dbdc18383cd47972a2be864..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/DeclarationFile/GearboxFileDecl.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TUGraz.VectoCore.InputData.FileIO.DeclarationFile -{ - ///// <summary> - ///// Represents the Data containing all parameters of the gearbox - ///// </summary> - ///// { - ///// "Header": { - ///// "CreatedBy": "Raphael Luz IVT TU-Graz (85407225-fc3f-48a8-acda-c84a05df6837)", - ///// "Date": "29.07.2014 16:59:17", - ///// "AppVersion": "2.0.4-beta", - ///// "FileVersion": 4 - ///// }, - ///// "Body": { - ///// "SavedInDeclMode": false, - ///// "ModelName": "Generic 24t Coach", - ///// "GearboxType": "AMT", - ///// "Gears": [ - ///// { - ///// "Ratio": 3.240355, - ///// "LossMap": "Axle.vtlm" - ///// }, - ///// { - ///// "Ratio": 6.38, - ///// "LossMap": "Indirect GearData.vtlm", - ///// }, - ///// ... - ///// ] - ///// } - //public class GearboxFileV5Declaration : VectoGearboxFile - //{ - // [JsonProperty(Required = Required.Always)] public JsonDataHeader Header; - // [JsonProperty(Required = Required.Always)] public DataBodyDecl Body; - - // public class DataBodyDecl - // { - // [JsonProperty("SavedInDeclMode", Required = Required.Always)] public bool SavedInDeclarationMode; - - // /// <summary> - // /// Model. Free text defining the gearbox model, type, etc. - // /// </summary> - // [JsonProperty(Required = Required.Always)] public string ModelName; - - // [JsonProperty(Required = Required.Always)] public string GearboxType; - - // [JsonProperty(Required = Required.Always)] public IList<GearDataDecl> Gears; - // } - - // public class GearDataDecl - // { - // [JsonProperty(Required = Required.Always)] public double Ratio; - // [JsonProperty(Required = Required.Always)] public string LossMap; - // [JsonProperty] public string FullLoadCurve; - // } - //} -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/DeclarationFile/JobFileDecl.cs b/VectoCore/InputData/FileIO/DeclarationFile/JobFileDecl.cs deleted file mode 100644 index 83467f9108ce9b03f545add81f423e0c77ca507f..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/DeclarationFile/JobFileDecl.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TUGraz.VectoCore.InputData.FileIO.DeclarationFile -{ - ///// <summary> - ///// A class which represents the json data format for serializing and deserializing the Job Data files. - ///// Fileformat: .vecto - ///// </summary> - ///// <code> - ///// { - ///// "Header": { - ///// "CreatedBy": " ()", - ///// "Date": "3/4/2015 12:31:06 PM", - ///// "AppVersion": "2.0.4-beta3", - ///// "FileVersion": 2 - ///// }, - ///// "Body": { - ///// "SavedInDeclMode": true, - ///// "VehicleFile": "../Components/12t Delivery Truck.vveh", - ///// "EngineFile": "../Components/12t Delivery Truck.veng", - ///// "GearboxFile": "../Components/12t Delivery Truck.vgbx", - ///// "Cycles": [ - ///// "Long Haul", - ///// "Regional Delivery", - ///// "Urban Delivery" - ///// ], - ///// "Aux": [ - ///// { - ///// "ID": "FAN", - ///// "Type": "Fan", - ///// "Path": "<NOFILE>", - ///// "Technology": "" - ///// }, - ///// { - ///// "ID": "STP", - ///// "Type": "Steering pump", - ///// "Path": "<NOFILE>", - ///// "Technology": "" - ///// }, - ///// { - ///// "ID": "AC", - ///// "Type": "HVAC", - ///// "Path": "<NOFILE>", - ///// "Technology": "" - ///// }, - ///// { - ///// "ID": "ES", - ///// "Type": "Electric System", - ///// "Path": "<NOFILE>", - ///// "Technology": "", - ///// "TechList": [] - ///// }, - ///// { - ///// "ID": "PS", - ///// "Type": "Pneumatic System", - ///// "Path": "<NOFILE>", - ///// "Technology": "" - ///// } - ///// ], - ///// "VACC": "<NOFILE>", - ///// "EngineOnlyMode": true, - ///// "StartStop": { - ///// "Enabled": false, - ///// "MaxSpeed": 5.0, - ///// "MinTime": 5.0, - ///// "Delay": 5 - ///// }, - ///// "LAC": { - ///// "Enabled": true, - ///// "Dec": -0.5, - ///// "MinSpeed": 50.0 - ///// }, - ///// "OverSpeedEcoRoll": { - ///// "Mode": "OverSpeed", - ///// "MinSpeed": 50.0, - ///// "OverSpeed": 5.0, - ///// "UnderSpeed": 5.0 - ///// } - ///// } - ///// } - ///// </code> - //public class VectoJobFileV2Declaration : VectoJobFile - //{ - // [JsonProperty(Required = Required.Always)] public JsonDataHeader Header; - // [JsonProperty(Required = Required.Always)] public DataBodyDecl Body; - - - // public class DataBodyDecl - // { - // [JsonProperty("SavedInDeclMode")] public bool SavedInDeclarationMode; - - // [JsonProperty(Required = Required.Always)] public string VehicleFile; - // [JsonProperty(Required = Required.Always)] public string EngineFile; - // [JsonProperty(Required = Required.Always)] public string GearboxFile; - // //[JsonProperty(Required = Required.Always)] public IList<string> Cycles; - // [JsonProperty] public List<AuxDataDecl> Aux = new List<AuxDataDecl>(); - // //[JsonProperty(Required = Required.Always)] public string VACC; - // //[JsonProperty(Required = Required.Always)] public bool EngineOnlyMode; - // [JsonProperty(Required = Required.Always)] public StartStopDataDecl StartStop; - // //[JsonProperty(Required = Required.Always)] public LACData LAC; - // [JsonProperty(Required = Required.Always)] public OverSpeedEcoRollDataDecl OverSpeedEcoRoll; - - // public class AuxDataDecl : VectoAuxiliaryFile - // { - // [JsonProperty(Required = Required.Always)] public string ID; - // [JsonProperty(Required = Required.Always)] public string Type; - // //[JsonProperty(Required = Required.Always)] public string Path; - // [JsonProperty(Required = Required.Always)] public string Technology; - // [JsonProperty] public IList<string> TechList; - // } - - // public class StartStopDataDecl - // { - // [JsonProperty(Required = Required.Always)] public bool Enabled; - // //[JsonProperty(Required = Required.Always)] public double MaxSpeed; - // //[JsonProperty(Required = Required.Always)] public double MinTime; - // //[JsonProperty(Required = Required.Always)] public double Delay; - // } - - // //public class LACData - // //{ - // // [JsonProperty(Required = Required.Always)] public bool Enabled; - // // [JsonProperty(Required = Required.Always)] public double Dec; - // // [JsonProperty(Required = Required.Always)] public double MinSpeed; - // //} - - // public class OverSpeedEcoRollDataDecl - // { - // [JsonProperty(Required = Required.Always)] public string Mode; - // //[JsonProperty(Required = Required.Always)] public double MinSpeed; - // //[JsonProperty(Required = Required.Always)] public double OverSpeed; - // //[JsonProperty(Required = Required.Always)] public double UnderSpeed; - // } - // } - //} -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/DeclarationFile/VehicleFileDecl.cs b/VectoCore/InputData/FileIO/DeclarationFile/VehicleFileDecl.cs deleted file mode 100644 index e2201d11d1e534b97e1d77fbcc1171d8e48fc30e..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/DeclarationFile/VehicleFileDecl.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; -using Newtonsoft.Json; -using TUGraz.VectoCore.Models.Declaration; - -namespace TUGraz.VectoCore.InputData.FileIO.DeclarationFile -{ - //internal class VehicleFileV7Declaration : VectoVehicleFile - //{ - // [JsonProperty(Required = Required.Always)] public JsonDataHeader Header; - // [JsonProperty(Required = Required.Always)] public DataBodyDecl Body; - - // 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("MassMax", Required = Required.Always)] public double GrossVehicleMassRating; - - // [JsonProperty("CdA", Required = Required.Always)] public double DragCoefficient; - - // [JsonProperty("CdA2")] public double DragCoefficientRigidTruck; // without trailer - - // [JsonProperty("Rim", Required = Required.Always)] public string RimStr; - - // [JsonProperty("Retarder", Required = Required.Always)] public RetarderData 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; - - // [JsonProperty] public double Inertia; - // [JsonProperty] public double AxleWeightShare; - // } - - // public class RetarderData - // { - // [JsonProperty("Type", Required = Required.Always)] public string TypeStr; - - // [JsonProperty] public double Ratio; - - // [JsonProperty] public string File; - // } - // } - //} - -// } -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/EngineeringFile/EngineFileEng.cs b/VectoCore/InputData/FileIO/EngineeringFile/EngineFileEng.cs deleted file mode 100644 index 739191156acf0b8a0a29d72fbc3654440220e174..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/EngineeringFile/EngineFileEng.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Newtonsoft.Json; -using TUGraz.VectoCore.InputData.FileIO.DeclarationFile; - -namespace TUGraz.VectoCore.InputData.FileIO.EngineeringFile -{ - //internal class EngineFileV3Engineering : EngineFileV3Declaration - //{ - // [JsonProperty(Required = Required.Always)] public new DataBodyEng Body; - - // public class DataBodyEng : DataBodyDecl - // { - // /// <summary> - // /// [kgm^2] Inertia including Flywheel - // /// Inertia for rotating parts including engine flywheel. - // /// In Declaration Mode the inertia is calculated automatically. - // /// </summary> - // [JsonProperty(Required = Required.Always)] public double Inertia; - // } - //} -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/EngineeringFile/GearboxFileEng.cs b/VectoCore/InputData/FileIO/EngineeringFile/GearboxFileEng.cs deleted file mode 100644 index 65a98c318c30c0caa2fc6e9537efb5da6798bb06..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/EngineeringFile/GearboxFileEng.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System.Collections.Generic; -using JetBrains.Annotations; -using Newtonsoft.Json; -using TUGraz.VectoCore.InputData.FileIO.DeclarationFile; - -namespace TUGraz.VectoCore.InputData.FileIO.EngineeringFile -{ - ///// <summary> - ///// Represents the Data containing all parameters of the gearbox - ///// </summary> - ///// { - ///// "Header": { - ///// "CreatedBy": "Raphael Luz IVT TU-Graz (85407225-fc3f-48a8-acda-c84a05df6837)", - ///// "Date": "29.07.2014 16:59:17", - ///// "AppVersion": "2.0.4-beta", - ///// "FileVersion": 4 - ///// }, - ///// "Body": { - ///// "SavedInDeclMode": false, - ///// "ModelName": "Generic 24t Coach", - ///// "Inertia": 0.0, - ///// "TracInt": 1.0, - ///// "TqReserve": 20.0, - ///// "SkipGears": true, - ///// "ShiftTime": 2, - ///// "EaryShiftUp": true, - ///// "StartTqReserve": 20.0, - ///// "StartSpeed": 2.0, - ///// "StartAcc": 0.6, - ///// "GearboxType": "AMT", - ///// "TorqueConverter": { - ///// "Enabled": false, - ///// "File": "<NOFILE>", - ///// "RefRPM": 0.0, - ///// "Inertia": 0.0 - ///// } - ///// "Gears": [ - ///// { - ///// "Ratio": 3.240355, - ///// "LossMap": "Axle.vtlm" - ///// }, - ///// { - ///// "Ratio": 6.38, - ///// "LossMap": "Indirect GearData.vtlm", - ///// "TCactive": false, - ///// "ShiftPolygon": "ShiftPolygon.vgbs" - ///// }, - ///// ... - ///// ] - ///// } - //public class GearboxFileV5Engineering : GearboxFileV5Declaration - //{ - // [JsonProperty(Required = Required.Always)] public new DataBodyEng Body; - - // public class DataBodyEng : DataBodyDecl - // { - // [JsonProperty(Required = Required.Always)] public new IList<GearDataEng> Gears; - - // /// <summary> - // /// [kgm^2] Rotation inertia of the gearbox (constant for all gears) - // /// </summary> - // [JsonProperty(Required = Required.Always)] public double Inertia; - - // /// <summary> - // /// [s] Interruption time during gear shift event - // /// </summary> - // [JsonProperty("TracInt", Required = Required.Always)] public double TractionInterruption; - - // /// <summary> - // /// [%] (0-1) Defines the torque reserve for EarlyUpShift and SkipGears in the Shifting Strategy. - // /// </summary> - // /// <remarks>Is serialized via the property <see cref="TorqueReserveConverterProperty"/>.</remarks> - // public double TorqueReserve - // { - // get { return _torqueReserve; } - // set { _torqueReserve = value; } - // } - - // [JsonProperty("TqReserve"), UsedImplicitly] - // private double TorqueReserveConverterProperty - // { - // get { return (int)_torqueReserve * 100; } - // set { _torqueReserve = value / 100; } - // } - - - // [JsonProperty] public bool SkipGears; - - // /// <summary> - // /// [s] Minimum time interval between two gearshifts - // /// </summary> - // [JsonProperty] public double ShiftTime; - - // /// <summary> - // /// [true/false] true if earlyUpShift in Gearbox is active - // /// </summary> - // [JsonProperty] public bool EarlyShiftUp; - - // /// <summary> - // /// [%] (0-1) The start torque reserve for finding the starting gear. - // /// </summary> - // /// <remarks>Is serialized via the property <see cref="StartTorqueReserveConverterProperty"/>.</remarks> - // public double StartTorqueReserve - // { - // get { return _startTorqueReserve; } - // set { _startTorqueReserve = value; } - // } - - // [JsonProperty("StartTqReserve"), UsedImplicitly] - // private double StartTorqueReserveConverterProperty - // { - // get { return (int)_startTorqueReserve * 100; } - // set { _startTorqueReserve = value / 100; } - // } - - // /// <summary> - // /// [m/s] vehicle speed at start - // /// </summary> - // [JsonProperty] public double StartSpeed; - - // /// <summary> - // /// [m/s^2] accelleration of the vehicle at start - // /// </summary> - // [JsonProperty("StartAcc")] public double StartAcceleration; - - // /// <summary> - // /// Contains all parameters of the torque converter if used - // /// </summary> - // [JsonProperty] public TorqueConverterDataEng TorqueConverter; - - // private double _startTorqueReserve; - // private double _torqueReserve; - // } - - // public class GearDataEng : GearDataDecl - // { - // [JsonProperty] public string ShiftPolygon; - // [JsonProperty] public bool TCactive; - // } - - // public class TorqueConverterDataEng - // { - // [JsonProperty(Required = Required.Always)] public bool Enabled; - // [JsonProperty(Required = Required.Always)] public string File; - // [JsonProperty("RefRPM", Required = Required.Always)] public double ReferenceRPM; - // [JsonProperty(Required = Required.Always)] public double Inertia; - // } - //} -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/EngineeringFile/JobFileEng.cs b/VectoCore/InputData/FileIO/EngineeringFile/JobFileEng.cs deleted file mode 100644 index b213e3fe13b52c8d2d8cc755a5c03374f66fea1b..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/EngineeringFile/JobFileEng.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TUGraz.VectoCore.InputData.FileIO.DeclarationFile; - -namespace TUGraz.VectoCore.InputData.FileIO.EngineeringFile -{ - ///// <summary> - ///// Represents the Vecto Job File. Fileformat: .vecto - ///// </summary> - ///// <code> - /////{ - ///// "Header": { - ///// "CreatedBy": " ()", - ///// "Date": "3/4/2015 2:09:13 PM", - ///// "AppVersion": "2.0.4-beta3", - ///// "FileVersion": 2 - ///// }, - ///// "Body": { - ///// "SavedInDeclMode": false, - ///// "VehicleData": "24t Coach.vveh", - ///// "EngineData": "24t Coach.veng", - ///// "GearboxData": "24t Coach.vgbx", - ///// "Cycles": [ - ///// "W:\\VECTO\\CITnet\\VECTO\\bin\\Debug\\Declaration\\MissionCycles\\LOT2_rural Engine Only.vdri" - ///// ], - ///// "Aux": [ - ///// { - ///// "ID": "ALT1", - ///// "Type": "Alternator", - ///// "Path": "24t_Coach_ALT.vaux", - ///// "Technology": "" - ///// }, - ///// { - ///// "ID": "ALT2", - ///// "Type": "Alternator", - ///// "Path": "24t_Coach_ALT.vaux", - ///// "Technology": "" - ///// }, - ///// { - ///// "ID": "ALT3", - ///// "Type": "Alternator", - ///// "Path": "24t_Coach_ALT.vaux", - ///// "Technology": "" - ///// } - ///// ], - ///// "AccelerationLimitingFile": "Coach.vacc", - ///// "IsEngineOnly": true, - ///// "StartStop": { - ///// "Enabled": false, - ///// "MaxSpeed": 5.0, - ///// "MinTime": 0.0, - ///// "Delay": 0 - ///// }, - ///// "LookAheadCoasting": { - ///// "Enabled": true, - ///// "Dec": -0.5, - ///// "MinSpeed": 50.0 - ///// }, - ///// "OverSpeedEcoRoll": { - ///// "Mode": "OverSpeed", - ///// "MinSpeed": 70.0, - ///// "OverSpeed": 5.0, - ///// "UnderSpeed": 5.0 - ///// } - ///// } - /////} - ///// </code> - //public class VectoJobFileV2Engineering : VectoJobFileV2Declaration - //{ - // [JsonProperty(Required = Required.Always)] public new DataBodyEng Body; - - - // public class DataBodyEng : DataBodyDecl - // { - // [JsonProperty(Required = Required.Always)] public IList<string> Cycles; - // [JsonProperty] public new IList<AuxDataEng> Aux = new List<AuxDataEng>(); - // [JsonProperty("VACC", Required = Required.Always)] public string AccelerationCurve; - // [JsonProperty] public bool EngineOnlyMode; - // [JsonProperty(Required = Required.Always)] public new StartStopDataDeclEng StartStop; - // [JsonProperty("LAC", Required = Required.Always)] public LACDataEng LookAheadCoasting; - // [JsonProperty(Required = Required.Always)] public new OverSpeedEcoRollDataEng OverSpeedEcoRoll; - - // public class AuxDataEng : AuxDataDecl - // { - // [JsonProperty(Required = Required.Always)] public string Path; - // } - - // public class StartStopDataDeclEng : StartStopDataDecl - // { - // [JsonProperty(Required = Required.Always)] public double MaxSpeed; - // [JsonProperty(Required = Required.Always)] public double MinTime; - // [JsonProperty(Required = Required.Always)] public double Delay; - // } - - // public class LACDataEng - // { - // [JsonProperty(Required = Required.Always)] public bool Enabled; - // [JsonProperty(Required = Required.Always)] public double Dec; - // [JsonProperty(Required = Required.Always)] public double MinSpeed; - // } - - // public class OverSpeedEcoRollDataEng : OverSpeedEcoRollDataDecl - // { - // [JsonProperty(Required = Required.Always)] public double MinSpeed; - // [JsonProperty(Required = Required.Always)] public double OverSpeed; - // [JsonProperty(Required = Required.Always)] public double UnderSpeed; - // } - // } - //} -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/EngineeringFile/VehicleFileEng.cs b/VectoCore/InputData/FileIO/EngineeringFile/VehicleFileEng.cs deleted file mode 100644 index 024ef70880c63b52101c1b0506cf4517d531eb95..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/EngineeringFile/VehicleFileEng.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Newtonsoft.Json; -using TUGraz.VectoCore.InputData.FileIO.DeclarationFile; - -namespace TUGraz.VectoCore.InputData.FileIO.EngineeringFile -{ - //internal class VehicleFileV7Engineering : VehicleFileV7Declaration - //{ - // [JsonProperty(Required = Required.Always)] public new DataBodyEng Body; - - - // internal class DataBodyEng : DataBodyDecl - // { - // [JsonProperty] public double CurbWeightExtra; - - // [JsonProperty] public double Loading; - - - // [JsonProperty("rdyn")] public double DynamicTyreRadius; - - - // [JsonProperty("CdCorrMode")] public string CrossWindCorrectionModeStr; - - // [JsonProperty("CdCorrFile")] public string CrossWindCorrectionFile; - - - // //[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 double AxleWeightShare; - // //} - // } - //} -} - -//} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/InputFileReader.cs b/VectoCore/InputData/FileIO/InputFileReader.cs deleted file mode 100644 index e9d92c1ee747ec7a11d590376295c969477b09f3..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/InputFileReader.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Newtonsoft.Json; -using TUGraz.VectoCore.Models; - -namespace TUGraz.VectoCore.InputData.FileIO -{ - //public class InputFileReader : LoggingObject - //{ - // //protected class VersionInfo - // //{ - // // public bool SavedInDeclarationMode; - // // public int Version; - // //} - - // protected InputFileReader() {} - - // //protected static VersionInfo GetFileVersion(string jsonStr) - // //{ - // // var data = new { Header = new { FileVersion = -1 }, Body = new { SavedInDeclMode = false } }; - // // data = JsonConvert.DeserializeAnonymousType(jsonStr, data); - // // return new VersionInfo { SavedInDeclarationMode = data.Body.SavedInDeclMode, Version = data.Header.FileVersion }; - // //} - //} -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/JSON/JSONEngineData.cs b/VectoCore/InputData/FileIO/JSON/JSONEngineData.cs index d7602a0b052a8677d866e93d9527f0943a75d20e..7edc38f3da2ecc3ba2e8806c1ea81d73af5f76c8 100644 --- a/VectoCore/InputData/FileIO/JSON/JSONEngineData.cs +++ b/VectoCore/InputData/FileIO/JSON/JSONEngineData.cs @@ -4,6 +4,36 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.InputData.FileIO.JSON { + /// <summary> + /// Represents the CombustionEngineData. Fileformat: .veng + /// </summary> + /// <code> + /// { + /// "Header": { + /// "CreatedBy": " ()", + /// "Date": "3/4/2015 12:26:24 PM", + /// "AppVersion": "2.0.4-beta3", + /// "FileVersion": 2 + /// }, + /// "Body": { + /// "SavedInDeclMode": false, + /// "ModelName": "Generic 24t Coach", + /// "Displacement": 12730.0, + /// "IdlingSpeed": 560.0, + /// "Inertia": 3.8, + /// "FullLoadCurves": [ + /// { + /// "Path": "24t Coach.vfld", + /// "Gears": "0 - 99" + /// } + /// ], + /// "FuelMap": "24t Coach.vmap", + /// "WHTC-Urban": 0.0, + /// "WHTC-Rural": 0.0, + /// "WHTC-Motorway": 0.0 + /// } + /// } + /// </code> public class JSONEngineDataV3 : JSONFile, IEngineInputData { public JSONEngineDataV3(JObject data, string fileName) : base(data, fileName) {} diff --git a/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs b/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs index 31f15d3e088adf5b17be5cded8b53b06014c26c4..7f18e0be21c30baa8e797a729779cf2ded406cde 100644 --- a/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs +++ b/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs @@ -7,6 +7,32 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.InputData.FileIO.JSON { + /// <summary> + /// Represents the Data containing all parameters of the gearbox + /// </summary> + /// { + /// "Header": { + /// "CreatedBy": "Raphael Luz IVT TU-Graz (85407225-fc3f-48a8-acda-c84a05df6837)", + /// "Date": "29.07.2014 16:59:17", + /// "AppVersion": "2.0.4-beta", + /// "FileVersion": 4 + /// }, + /// "Body": { + /// "SavedInDeclMode": false, + /// "ModelName": "Generic 24t Coach", + /// "GearboxType": "AMT", + /// "Gears": [ + /// { + /// "Ratio": 3.240355, + /// "LossMap": "Axle.vtlm" + /// }, + /// { + /// "Ratio": 6.38, + /// "LossMap": "Indirect GearData.vtlm", + /// }, + /// ... + /// ] + /// } public class JSONGearboxDataV5 : JSONFile, IGearboxInputData, IAxleGearInputData, ITorqueConverterInputData { public JSONGearboxDataV5(JObject data, string filename) : base(data, filename) {} diff --git a/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index 6da3fb45c6726dd6fb324723cd9405e55157e425..2266026934249aeef4693a25e1791e56ffadecd7 100644 --- a/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -12,6 +12,14 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.InputData.FileIO.JSON { + /// <summary> + /// "Header": { + /// "CreatedBy": "Raphael Luz IVT TU-Graz (85407225-fc3f-48a8-acda-c84a05df6837)", + /// "Date": "29.07.2015 16:59:03", + /// "AppVersion": "2.2", + /// "FileVersion": 7 + /// }, + /// </summary> public abstract class JSONFile { private string _basePath; @@ -61,6 +69,83 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON } } + /// <summary> + /// A class which represents the json data format for serializing and deserializing the Job Data files. + /// Fileformat: .vecto + /// </summary> + /// <code> + /// { + /// "Header": { + /// "CreatedBy": " ()", + /// "Date": "3/4/2015 12:31:06 PM", + /// "AppVersion": "2.0.4-beta3", + /// "FileVersion": 2 + /// }, + /// "Body": { + /// "SavedInDeclMode": true, + /// "VehicleFile": "../Components/12t Delivery Truck.vveh", + /// "EngineFile": "../Components/12t Delivery Truck.veng", + /// "GearboxFile": "../Components/12t Delivery Truck.vgbx", + /// "Cycles": [ + /// "Long Haul", + /// "Regional Delivery", + /// "Urban Delivery" + /// ], + /// "Aux": [ + /// { + /// "ID": "FAN", + /// "Type": "Fan", + /// "Path": "<NOFILE>", + /// "Technology": "" + /// }, + /// { + /// "ID": "STP", + /// "Type": "Steering pump", + /// "Path": "<NOFILE>", + /// "Technology": "" + /// }, + /// { + /// "ID": "AC", + /// "Type": "HVAC", + /// "Path": "<NOFILE>", + /// "Technology": "" + /// }, + /// { + /// "ID": "ES", + /// "Type": "Electric System", + /// "Path": "<NOFILE>", + /// "Technology": "", + /// "TechList": [] + /// }, + /// { + /// "ID": "PS", + /// "Type": "Pneumatic System", + /// "Path": "<NOFILE>", + /// "Technology": "" + /// } + /// ], + /// "VACC": "<NOFILE>", + /// "EngineOnlyMode": true, + /// "StartStop": { + /// "Enabled": false, + /// "MaxSpeed": 5.0, + /// "MinTime": 5.0, + /// "Delay": 5 + /// }, + /// "LAC": { + /// "Enabled": true, + /// "Dec": -0.5, + /// "MinSpeed": 50.0 + /// }, + /// "OverSpeedEcoRoll": { + /// "Mode": "OverSpeed", + /// "MinSpeed": 50.0, + /// "OverSpeed": 5.0, + /// "UnderSpeed": 5.0 + /// } + /// } + /// } + /// </code> public class JSONInputDataV2 : JSONFile, IInputDataProvider, IJobInputData, IDriverInputData, IAuxiliariesInputData { protected IGearboxInputData Gearbox; diff --git a/VectoCore/InputData/FileIO/JsonDataHeader.cs b/VectoCore/InputData/FileIO/JsonDataHeader.cs deleted file mode 100644 index d360203f9cafeeca47adf5b790c76eb345ccbebb..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/JsonDataHeader.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using Newtonsoft.Json; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.InputData.FileIO -{ - /// <summary> - /// "Header": { - /// "CreatedBy": "Raphael Luz IVT TU-Graz (85407225-fc3f-48a8-acda-c84a05df6837)", - /// "Date": "29.07.2015 16:59:03", - /// "AppVersion": "2.2", - /// "FileVersion": 7 - /// }, - /// </summary> - //public class JsonDataHeader - //{ - // [JsonProperty(Required = Required.Always)] public string CreatedBy; - // [JsonProperty(Required = Required.Always), JsonConverter(typeof(DateTimeFallbackDeserializer))] public DateTime Date; - // [JsonProperty(Required = Required.Always)] public string AppVersion; - // [JsonProperty(Required = Required.Always)] public uint FileVersion; - - // #region Equality members - - // protected bool Equals(JsonDataHeader other) - // { - // return string.Equals(CreatedBy, other.CreatedBy) && Date.Equals(other.Date) && - // string.Equals(AppVersion, other.AppVersion) && FileVersion.Equals(other.FileVersion); - // } - - // public override bool Equals(object obj) - // { - // if (ReferenceEquals(null, obj)) { - // return false; - // } - // if (ReferenceEquals(this, obj)) { - // return true; - // } - // if (obj.GetType() != GetType()) { - // return false; - // } - // return Equals((JsonDataHeader)obj); - // } - - // public override int GetHashCode() - // { - // unchecked { - // var hashCode = (CreatedBy != null ? CreatedBy.GetHashCode() : 0); - // hashCode = (hashCode * 397) ^ Date.GetHashCode(); - // hashCode = (hashCode * 397) ^ (AppVersion != null ? AppVersion.GetHashCode() : 0); - // hashCode = (hashCode * 397) ^ FileVersion.GetHashCode(); - // return hashCode; - // } - // } - - // #endregion - //} -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/Reader/Impl/AbstractVectoRunDataFactory.cs b/VectoCore/InputData/FileIO/Reader/Impl/AbstractVectoRunDataFactory.cs deleted file mode 100644 index 909697a8c6eb3875e05236d2a857e4d2b4fe5459..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/Reader/Impl/AbstractVectoRunDataFactory.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections.Generic; -using TUGraz.VectoCore.Models.Simulation.Data; - -namespace TUGraz.VectoCore.InputData.FileIO.Reader.Impl -{ - public abstract class AbstractVectoRunDataFactory : IVectoRunDataFactory - { - //protected string JobBasePath = ""; - - //protected VectoJobFile Job { get; set; } - - //protected VectoVehicleFile Vehicle { get; set; } - - //protected VectoGearboxFile Gearbox { get; set; } - - //protected VectoEngineFile Engine { get; set; } - - //protected IList<VectoRunData.AuxData> Aux { get; set; } - - //public void SetJobFile(string filename) - //{ - // Job = ReadJobFile(filename); - // ProcessJob(Job); - //} - - //public abstract bool IsEngineOnly { get; } - - public abstract IEnumerable<VectoRunData> NextRun(); - - - //protected abstract void ProcessJob(VectoJobFile job); - - - ///// <summary> - ///// has to read the file string and create file-container - ///// </summary> - //protected abstract VectoJobFile ReadJobFile(string file); - - ///// <summary> - ///// has to read the file string and create file-container - ///// </summary> - //protected abstract VectoVehicleFile ReadVehicle(string file); - - //protected abstract VectoEngineFile ReadEngine(string file); - - //protected abstract VectoGearboxFile ReadGearbox(string file); - - //protected abstract IList<VectoRunData.AuxData> ReadAuxiliary(string basePath, - // IEnumerable<VectoAuxiliaryFile> auxiliaries); - } -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/Reader/Impl/DeclarationModeVectoRunDataFactory.cs b/VectoCore/InputData/FileIO/Reader/Impl/DeclarationModeVectoRunDataFactory.cs deleted file mode 100644 index fa1eb4c339f9835c657fc69d41eabfe20bfc6b8e..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/Reader/Impl/DeclarationModeVectoRunDataFactory.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using TUGraz.VectoCore.InputData.FileIO.Reader.DataObjectAdaper; -using TUGraz.VectoCore.Models; -using TUGraz.VectoCore.Models.Declaration; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.OutputData.PDF; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.InputData.FileIO.Reader.Impl -{ - public class DeclarationModeVectoRunDataFactory : LoggingObject, IVectoRunDataFactory - { - protected static Dictionary<MissionType, DrivingCycleData> CyclesCache = - new Dictionary<MissionType, DrivingCycleData>(); - - protected IInputDataProvider InputDataProvider; - - protected DeclarationReport Report; - - internal DeclarationModeVectoRunDataFactory(IInputDataProvider dataProvider, DeclarationReport report) - { - InputDataProvider = dataProvider; - Report = report; - } - - //protected void CheckForDeclarationMode(VersionInfo info, string msg) - //{ - // if (!info.SavedInDeclarationMode) { - // // throw new VectoException("File not saved in Declaration Mode! - " + msg); - // Log.Warn("File not saved in Declaration Mode! - {0}", msg); - // } - //} - - public IEnumerable<VectoRunData> NextRun() - { - var dao = new DeclarationDataAdapter(); - var segment = GetVehicleClassification(InputDataProvider.VehicleInputData.VehicleCategory, - InputDataProvider.VehicleInputData.AxleConfiguration, - InputDataProvider.VehicleInputData.GrossVehicleMassRating, InputDataProvider.VehicleInputData.CurbWeight); - var driverdata = dao.CreateDriverData(InputDataProvider.DriverInputData); - driverdata.AccelerationCurve = AccelerationCurveData.ReadFromStream(segment.AccelerationFile); - - var engineData = dao.CreateEngineData(InputDataProvider.EngineInputData); - - var gearboxData = dao.CreateGearboxData(InputDataProvider.GearboxInputData, engineData); - - ConfigureReport(engineData, gearboxData, segment); - - foreach (var mission in segment.Missions) { - DrivingCycleData cycle; - if (CyclesCache.ContainsKey(mission.MissionType)) { - cycle = CyclesCache[mission.MissionType]; - } else { - cycle = DrivingCycleDataReader.ReadFromStream(mission.CycleFile, CycleType.DistanceBased); - CyclesCache.Add(mission.MissionType, cycle); - } - foreach (var loading in mission.Loadings) { - var simulationRunData = new VectoRunData { - Loading = loading.Key, - VehicleData = dao.CreateVehicleData(InputDataProvider.VehicleInputData, mission, loading.Value), - EngineData = engineData, - GearboxData = dao.CreateGearboxData(InputDataProvider.GearboxInputData, engineData), - AxleGearData = dao.CreateAxleGearData(InputDataProvider.AxleGearInputData), - Aux = - dao.CreateAuxiliaryData(InputDataProvider.AuxiliaryInputData(), mission.MissionType, - segment.VehicleClass), - Cycle = cycle, - Retarder = dao.CreateRetarderData(InputDataProvider.RetarderInputData), - DriverData = driverdata, - IsEngineOnly = false, // InputDataProvider.JobInputData().EngineOnlyMode, - JobName = InputDataProvider.JobInputData().JobName, - //BasePath = Job.BasePath, - ModFileSuffix = loading.Key.ToString(), - Report = Report, - Mission = mission, - }; - simulationRunData.EngineData.WHTCCorrectionFactor = DeclarationData.WHTCCorrection.Lookup(mission.MissionType, - engineData.WHTCRural.Value(), engineData.WHTCUrban.Value(), engineData.WHTCMotorway.Value()); - simulationRunData.Cycle.Name = mission.MissionType.ToString(); - simulationRunData.VehicleData.VehicleClass = segment.VehicleClass; - yield return simulationRunData; - } - } - } - - private void ConfigureReport(CombustionEngineData engineData, GearboxData gearboxData, Segment segment) - { - if (Report == null) { - return; - } - Report.EngineModel = engineData.ModelName; - Report.EngineStr = string.Format("{0} l, {1} kW", - engineData.Displacement.ConvertTo().Cubic.Dezi.Meter.ToOutputFormat(1), - engineData.FullLoadCurve.MaxPower.ConvertTo().Kilo.Watt.ToOutputFormat(0)); - Report.Flc = engineData.FullLoadCurve; - Report.GearboxModel = gearboxData.ModelName; - Report.GearboxStr = string.Format("{0}-Speed {1}", gearboxData.Gears.Count, gearboxData.Type); - Report.Segment = segment; - Report.ResultCount = segment.Missions.Sum(m => m.Loadings.Count); - } - - internal Segment GetVehicleClassification(VehicleCategory category, AxleConfiguration axles, Kilogram grossMassRating, - Kilogram curbWeight) - { - //return new DeclarationSegments().Lookup(vehicle.VehicleCategory(), - // EnumHelper.ParseAxleConfigurationType(vehicle.AxleConfig.TypeStr), - // vehicle.GrossVehicleMassRating.SI<Ton>().Cast<Kilogram>(), vehicle.CurbWeight.SI<Kilogram>()); - - return DeclarationData.Segments.Lookup(category, axles, grossMassRating, curbWeight); - } - - // protected override void ProcessJob(VectoJobFile vectoJob) - // { - // try { - // var job = vectoJob as VectoJobFileV2Declaration; - // if (job == null) { - // throw new VectoException("Unhandled Job File Format. Expected: Job File, Version 2, Declaration Mode. Got: {0}", - // vectoJob.GetType()); - // } - // Vehicle = ReadVehicle(Path.Combine(job.BasePath, job.Body.VehicleFile)); - // DeclarationData.Engine = ReadEngine(Path.Combine(job.BasePath, job.Body.EngineFile)); - // Gearbox = ReadGearbox(Path.Combine(job.BasePath, job.Body.GearboxFile)); - // Aux = ReadAuxiliary(job.BasePath, job.Body.Aux); - // } catch (VectoException e) { - // var message = string.Format("Exception during processing of job file \"{0}\": {1}", vectoJob.JobFile, e.Message); - // Log.Error(message); - // throw new VectoException(message, e); - // } - // } - - // protected override VectoJobFile ReadJobFile(string file) - // { - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForDeclarationMode(fileInfo, "Job"); - - // switch (fileInfo.Version) { - // case 2: - // var job = JsonConvert.DeserializeObject<VectoJobFileV2Declaration>(json); - // job.BasePath = file; - // job.JobFile = file; - // return job; - // default: - // throw new UnsupportedFileVersionException("Unsupported version of job-file. Got version " + fileInfo.Version); - // } - // } - - // protected override VectoVehicleFile ReadVehicle(string file) - // { - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForDeclarationMode(fileInfo, "Vehicle"); - - // switch (fileInfo.Version) { - // case 7: - // var vehicle = JsonConvert.DeserializeObject<VehicleFileV7Declaration>(json); - // vehicle.BasePath = file; - // return vehicle; - // default: - // throw new UnsupportedFileVersionException("Unsupported Version of vehicle-file. Got version " + fileInfo.Version); - // } - // } - - // protected override VectoEngineFile ReadEngine(string file) - // { - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForDeclarationMode(fileInfo, "Engine"); - - // switch (fileInfo.Version) { - // case 3: - // var engine = JsonConvert.DeserializeObject<EngineFileV3Declaration>(json); - // engine.BasePath = file; - // return engine; - // default: - // throw new UnsupportedFileVersionException("Unsupported Version of engine-file. Got version " + fileInfo.Version); - // } - // } - - // protected override VectoGearboxFile ReadGearbox(string file) - // { - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForDeclarationMode(fileInfo, "Gearbox"); - - // switch (fileInfo.Version) { - // case 5: - // var gearbox = JsonConvert.DeserializeObject<GearboxFileV5Declaration>(json); - // gearbox.BasePath = file; - // return gearbox; - // default: - // throw new UnsupportedFileVersionException("Unsupported Version of gearbox-file. Got version " + fileInfo.Version); - // } - // } - - // protected override IList<VectoRunData.AuxData> ReadAuxiliary(string basePath, - // IEnumerable<VectoAuxiliaryFile> auxiliaries) - // { - // var inputAuxiliaries = auxiliaries.Cast<VectoJobFileV2Declaration.DataBodyDecl.AuxDataDecl>().ToArray(); - // return DeclarationData.AuxiliaryIDs().Select(id => { - // try { - // var a = inputAuxiliaries.First(decl => decl.ID == id); - // return new VectoRunData.AuxData { - // ID = a.ID, - // Type = AuxiliaryTypeHelper.Parse(a.Type), - // Technology = a.Technology, - // TechList = a.TechList.DefaultIfNull(Enumerable.Empty<string>()).ToArray(), - // DemandType = AuxiliaryDemandType.Constant - // }; - // } catch (InvalidOperationException) { - // var message = string.Format("Auxiliary was not found: Expected: [{0}], Got: [{1}]", - // string.Join(", ", DeclarationData.AuxiliaryIDs()), string.Join(", ", inputAuxiliaries.Select(a => a.ID))); - // Log.Error(message); - // throw new VectoException(message); - // } - // }).ToList(); - // //.Concat(new VectoRunData.AuxData { ID = "", DemandType = AuxiliaryDemandType.Direct}.ToEnumerable()).ToList(); - // } - - // internal Segment GetVehicleClassification(VehicleCategory category, AxleConfiguration axles, Kilogram grossMassRating, - // Kilogram curbWeight) - // { - // //return new DeclarationSegments().Lookup(vehicle.VehicleCategory(), - // // EnumHelper.ParseAxleConfigurationType(vehicle.AxleConfig.TypeStr), - // // vehicle.GrossVehicleMassRating.SI<Ton>().Cast<Kilogram>(), vehicle.CurbWeight.SI<Kilogram>()); - - // return DeclarationData.Segments.Lookup(category, axles, grossMassRating, curbWeight); - // } - - // public override bool IsEngineOnly - // { - // get { return false; } - // } - } -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/Reader/Impl/EngineeringModeVectoRunDataFactory.cs b/VectoCore/InputData/FileIO/Reader/Impl/EngineeringModeVectoRunDataFactory.cs deleted file mode 100644 index 6dc9a3456bbb2ea92e702fb98c6871688502f316..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/Reader/Impl/EngineeringModeVectoRunDataFactory.cs +++ /dev/null @@ -1,281 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.CompilerServices; -using Newtonsoft.Json; -using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.InputData.FileIO.EngineeringFile; -using TUGraz.VectoCore.InputData.FileIO.Reader.DataObjectAdaper; -using TUGraz.VectoCore.Models; -using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.Utils; - -[assembly: InternalsVisibleTo("VectoCoreTest")] - -namespace TUGraz.VectoCore.InputData.FileIO.Reader.Impl -{ - public class EngineeringModeVectoRunDataFactory : LoggingObject, IVectoRunDataFactory - { - protected DriverData Driver; - - protected IInputDataProvider InputDataProvider; - - internal EngineeringModeVectoRunDataFactory(IInputDataProvider dataProvider) - { - InputDataProvider = dataProvider; - } - - - //protected static void CheckForEngineeringMode(VersionInfo info, string msg) - //{ - // if (info.SavedInDeclarationMode) { - // Logger<EngineeringModeVectoRunDataFactory>() - // .Warn("{0} File was saved in Declaration Mode but is used for Engineering Mode!", msg); - // } - //} - - //protected override void ProcessJob(VectoJobFile vectoJob) - //{ - // try { - // var job = vectoJob as VectoJobFileV2Engineering; - // if (job == null) { - // throw new VectoException( - // string.Format("Unhandled Job File Format. Expected: Job File, Version 2, Engineering Mode. Got: {0}", - // vectoJob.GetType())); - // } - - // if (job.Body.EngineOnlyMode) { - // throw new VectoException("Job File has been saved in EngineOnlyMode!"); - // } - - // Vehicle = ReadVehicle(Path.Combine(job.BasePath, job.Body.VehicleFile)); - // Engine = ReadEngine(Path.Combine(job.BasePath, job.Body.EngineFile)); - // Gearbox = ReadGearbox(Path.Combine(job.BasePath, job.Body.GearboxFile)); - // Aux = ReadAuxiliary(job.BasePath, job.Body.Aux); - // } catch (VectoException e) { - // Log.Error("Exception during processing of job file {0}: {1}", e.Message); - // } - //} - - //protected override IList<VectoRunData.AuxData> ReadAuxiliary(string basePath, - // IEnumerable<VectoAuxiliaryFile> auxiliaries) - //{ - // return auxiliaries.Cast<VectoJobFileV2Engineering.DataBodyEng.AuxDataEng>().Select(a => new VectoRunData.AuxData { - // ID = a.ID, - // Technology = a.Technology, - // TechList = a.TechList.DefaultIfNull(Enumerable.Empty<string>()).ToArray(), - // DemandType = AuxiliaryDemandType.Mapping, - // Data = (!string.IsNullOrWhiteSpace(a.Path) && a.Path != "<NOFILE>") - // ? AuxiliaryData.ReadFromFile(Path.Combine(basePath, a.Path)) - // : null - // }).Concat(new VectoRunData.AuxData { ID = "", DemandType = AuxiliaryDemandType.Direct }.ToEnumerable()).ToList(); - //} - - - //protected override VectoVehicleFile ReadVehicle(string file) - //{ - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForEngineeringMode(fileInfo, "Vehicle"); - - // switch (fileInfo.Version) { - // case 7: - // var vehicle = JsonConvert.DeserializeObject<VehicleFileV7Engineering>(json); - // vehicle.BasePath = file; - // return vehicle; - // default: - // throw new UnsupportedFileVersionException("Unsupported Version of .vveh file. Got Version " + fileInfo.Version); - // } - //} - - /// <summary> - /// Iterate over all cycles defined in the JobFile and create a container with all data required for creating a simulation run - /// </summary> - /// <returns>VectoRunData instance for initializing the powertrain.</returns> - public virtual IEnumerable<VectoRunData> NextRun() - { - var dao = new EngineeringDataAdapter(); - var driver = dao.CreateDriverData(InputDataProvider.DriverInputData); - var engineData = dao.CreateEngineData(InputDataProvider.EngineInputData); - - foreach (var cycle in InputDataProvider.JobInputData().Cycles) { - var simulationRunData = new VectoRunData { - //BasePath = job.BasePath, - JobName = InputDataProvider.JobInputData().JobName, - EngineData = engineData, - GearboxData = dao.CreateGearboxData(InputDataProvider.GearboxInputData, engineData), - AxleGearData = dao.CreateAxleGearData(InputDataProvider.AxleGearInputData), - VehicleData = dao.CreateVehicleData(InputDataProvider.VehicleInputData), - DriverData = driver, - Aux = dao.CreateAuxiliaryData(InputDataProvider.AuxiliaryInputData()), - Retarder = dao.CreateRetarderData(InputDataProvider.RetarderInputData), - // TODO: distance or time-based cycle! - Cycle = - DrivingCycleDataReader.Create(cycle.CycleData, cycle.Name, CycleType.DistanceBased), - IsEngineOnly = InputDataProvider.JobInputData().EngineOnlyMode - }; - yield return simulationRunData; - } - } - - ///// <summary> - ///// create VehicleData instance directly from a file - ///// </summary> - ///// <param name="file">filename</param> - ///// <returns>VehicleData instance</returns> - //public static VehicleData CreateVehicleDataFromFile(string file) - //{ - // var data = DoReadVehicleFile(file); - // return new EngineeringDataAdapter().CreateVehicleData(data); - //} - - //public static DriverData CreateDriverDataFromFile(string file) - //{ - // var data = DoReadJobFile(file); - // return new EngineeringDataAdapter().CreateDriverData(data); - //} - - ///// <summary> - ///// Create CombustionEngineData instance directly from a file - ///// </summary> - ///// <param name="file">filename</param> - ///// <returns>CombustionengineData instance</returns> - //public static CombustionEngineData CreateEngineDataFromFile(string file) - //{ - // var data = DoReadEngineFile(file); - // return new EngineeringDataAdapter().CreateEngineData(data); - //} - - ///// <summary> - ///// Create gearboxdata instance directly from a file - ///// </summary> - ///// <param name="file">filename</param> - ///// <returns>GearboxData instance</returns> - //public static GearboxData CreateGearboxDataFromFile(string file) - //{ - // var data = DoReadGearboxFile(file); - // return new EngineeringDataAdapter().CreateGearboxData(data, null); - //} - - - ///// <summary> - ///// initialize vecto job member (deserialize Vecot-file - ///// </summary> - ///// <param name="file"></param> - //protected override VectoJobFile ReadJobFile(string file) - //{ - // return DoReadJobFile(file); - //} - - ///// <summary> - ///// initialize Engine member (deserialize Engine-file) - ///// </summary> - ///// <param name="file"></param> - //protected override VectoEngineFile ReadEngine(string file) - //{ - // return DoReadEngineFile(file); - //} - - ///// <summary> - ///// initialize Gearbox member (deserialize Gearbox-file) - ///// </summary> - ///// <param name="file"></param> - //protected override VectoGearboxFile ReadGearbox(string file) - //{ - // return DoReadGearboxFile(file); - //} - - ////============================================================== - - ///// <summary> - ///// initialize Job member (deserialize Job-file) - ///// </summary> - ///// <param name="file">file</param> - //protected static VectoJobFile DoReadJobFile(string file) - //{ - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForEngineeringMode(fileInfo, "Job"); - - // switch (fileInfo.Version) { - // case 2: - // var tmp = JsonConvert.DeserializeObject<VectoJobFileV2Engineering>(json); - // tmp.BasePath = file; - // tmp.JobFile = file; - // return tmp; - // default: - // throw new UnsupportedFileVersionException("Unsupported version of job-file. Got version " + fileInfo.Version); - // } - //} - - ///// <summary> - ///// De-serialize engine-file (JSON) - ///// </summary> - ///// <param name="file"></param> - ///// <returns></returns> - //protected static VectoEngineFile DoReadEngineFile(string file) - //{ - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForEngineeringMode(fileInfo, "Engine"); - - // switch (fileInfo.Version) { - // case 3: - // var tmp = JsonConvert.DeserializeObject<EngineFileV3Engineering>(json); - // tmp.BasePath = file; - // return tmp; - // default: - // throw new UnsupportedFileVersionException("Unsopported Version of engine-file. Got version " + fileInfo.Version); - // } - //} - - ///// <summary> - ///// De-serialize gearbox-file (JSON) - ///// </summary> - ///// <param name="file"></param> - ///// <returns></returns> - //protected static VectoGearboxFile DoReadGearboxFile(string file) - //{ - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForEngineeringMode(fileInfo, "Gearbox"); - - // switch (fileInfo.Version) { - // case 5: - // var tmp = JsonConvert.DeserializeObject<GearboxFileV5Engineering>(json); - // tmp.BasePath = file; - // return tmp; - // default: - // throw new UnsupportedFileVersionException("Unsopported Version of gearbox-file. Got version " + fileInfo.Version); - // } - //} - - ///// <summary> - ///// De-serialize vehicle-file (JSON) - ///// </summary> - ///// <param name="file"></param> - ///// <returns></returns> - //protected static VectoVehicleFile DoReadVehicleFile(string file) - //{ - // var json = File.ReadAllText(file); - // var fileInfo = GetFileVersion(json); - // CheckForEngineeringMode(fileInfo, "Vehicle"); - - // switch (fileInfo.Version) { - // case 7: - // var tmp = JsonConvert.DeserializeObject<VehicleFileV7Engineering>(json); - // tmp.BasePath = file; - // return tmp; - // default: - // throw new UnsupportedFileVersionException("Unsopported Version of vehicle-file. Got version " + fileInfo.Version); - // } - //} - - //public override bool IsEngineOnly - //{ - // get { return false; } - //} - } -} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/VectoFiles.cs b/VectoCore/InputData/FileIO/VectoFiles.cs deleted file mode 100644 index 56dc1522f836dc030d49794ccf50bd152b4b0a16..0000000000000000000000000000000000000000 --- a/VectoCore/InputData/FileIO/VectoFiles.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.IO; -using System.Runtime.Serialization; - -namespace TUGraz.VectoCore.InputData.FileIO -{ - //public abstract class VectoBaseFile - //{ - // //protected string basePath; - - // //[DataMember] - // //internal string BasePath - // //{ - // // get { return basePath; } - // // set { basePath = Path.GetDirectoryName(Path.GetFullPath(value)); } - // //} - //} - - - //public abstract class VectoJobFile : VectoBaseFile - //{ - // private string _jobFile; - - // [DataMember] - // internal string JobFile - // { - // get { return _jobFile; } - // set { _jobFile = Path.GetFileName(value); } - // } - //} - - //public abstract class VectoVehicleFile : VectoBaseFile {} - - //public abstract class VectoGearboxFile : VectoBaseFile {} - - //public abstract class VectoEngineFile : VectoBaseFile {} - - //public abstract class VectoAuxiliaryFile : VectoBaseFile {} -} \ No newline at end of file diff --git a/VectoCore/InputData/IVectoRunDataFactory.cs b/VectoCore/InputData/IVectoRunDataFactory.cs index 6be8acd2a4a9ec904e130fde6940f6d7989a08ec..3a736d98f4730930a9d6b52435647fabca0b3d32 100644 --- a/VectoCore/InputData/IVectoRunDataFactory.cs +++ b/VectoCore/InputData/IVectoRunDataFactory.cs @@ -5,12 +5,6 @@ namespace TUGraz.VectoCore.InputData { public interface IVectoRunDataFactory { - //void SetJobFile(string fileName); - IEnumerable<VectoRunData> NextRun(); - - //bool IsEngineOnly { get; } - // void SetJobJson(string jsonData, string basePath); } - } \ No newline at end of file diff --git a/VectoCore/InputData/InputData.cs b/VectoCore/InputData/InputData.cs index eb14b4d05a8a22a1fbeae6d9f00b1b3c6e5aa9f8..389438232cf09cd52d9d0a9713e9adf8d3eaa55d 100644 --- a/VectoCore/InputData/InputData.cs +++ b/VectoCore/InputData/InputData.cs @@ -1,12 +1,5 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Data; -using System.Linq; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Threading.Tasks; -using Newtonsoft.Json; -using TUGraz.VectoCore.InputData.FileIO.DeclarationFile; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Utils; diff --git a/VectoCore/InputData/FileIO/Reader/DataObjectAdaper/AbstractSimulationDataAdapter.cs b/VectoCore/InputData/Reader/DataObjectAdaper/AbstractSimulationDataAdapter.cs similarity index 94% rename from VectoCore/InputData/FileIO/Reader/DataObjectAdaper/AbstractSimulationDataAdapter.cs rename to VectoCore/InputData/Reader/DataObjectAdaper/AbstractSimulationDataAdapter.cs index cea74a4a0763a3c63db13b573ac2b4cb4c132cf4..4e536457162d54115feada26ee98041ca4cd6f96 100644 --- a/VectoCore/InputData/FileIO/Reader/DataObjectAdaper/AbstractSimulationDataAdapter.cs +++ b/VectoCore/InputData/Reader/DataObjectAdaper/AbstractSimulationDataAdapter.cs @@ -1,15 +1,11 @@ -using System; -using System.IO; -using System.Linq; -using TUGraz.VectoCore.InputData.FileIO.DeclarationFile; +using System.Linq; using TUGraz.VectoCore.Models; -using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.Utils; -namespace TUGraz.VectoCore.InputData.FileIO.Reader.DataObjectAdaper +namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper { public abstract class AbstractSimulationDataAdapter : LoggingObject { diff --git a/VectoCore/InputData/FileIO/Reader/DataObjectAdaper/DeclarationDataAdapter.cs b/VectoCore/InputData/Reader/DataObjectAdaper/DeclarationDataAdapter.cs similarity index 98% rename from VectoCore/InputData/FileIO/Reader/DataObjectAdaper/DeclarationDataAdapter.cs rename to VectoCore/InputData/Reader/DataObjectAdaper/DeclarationDataAdapter.cs index 56ad24e0fe69c3ad50e75443f1ff2bc6f1ab0afe..9246d56b578b578ded801ebfc57a5dda1416f39e 100644 --- a/VectoCore/InputData/FileIO/Reader/DataObjectAdaper/DeclarationDataAdapter.cs +++ b/VectoCore/InputData/Reader/DataObjectAdaper/DeclarationDataAdapter.cs @@ -1,9 +1,7 @@ using System.Collections.Generic; -using System.IO; using System.Linq; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.InputData.FileIO.DeclarationFile; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; @@ -11,7 +9,7 @@ using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.Utils; -namespace TUGraz.VectoCore.InputData.FileIO.Reader.DataObjectAdaper +namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper { public class DeclarationDataAdapter : AbstractSimulationDataAdapter { diff --git a/VectoCore/InputData/FileIO/Reader/DataObjectAdaper/EngineeringDataAdapter.cs b/VectoCore/InputData/Reader/DataObjectAdaper/EngineeringDataAdapter.cs similarity index 97% rename from VectoCore/InputData/FileIO/Reader/DataObjectAdaper/EngineeringDataAdapter.cs rename to VectoCore/InputData/Reader/DataObjectAdaper/EngineeringDataAdapter.cs index 5f3a1aab844ebf4dd1039830c46966255ab71d72..66670b9add507b1fd0f1592ea99351503860118b 100644 --- a/VectoCore/InputData/FileIO/Reader/DataObjectAdaper/EngineeringDataAdapter.cs +++ b/VectoCore/InputData/Reader/DataObjectAdaper/EngineeringDataAdapter.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; -using System.IO; using System.Linq; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.InputData.FileIO.EngineeringFile; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; @@ -11,7 +9,7 @@ using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.Utils; -namespace TUGraz.VectoCore.InputData.FileIO.Reader.DataObjectAdaper +namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper { public class EngineeringDataAdapter : AbstractSimulationDataAdapter { diff --git a/VectoCore/InputData/FileIO/Reader/DrivingCycleDataReader.cs b/VectoCore/InputData/Reader/DrivingCycleDataReader.cs similarity index 99% rename from VectoCore/InputData/FileIO/Reader/DrivingCycleDataReader.cs rename to VectoCore/InputData/Reader/DrivingCycleDataReader.cs index e2c2e55a37893af917b94a873de0d7a91415ab57..c21d9bdaa721bea6da2903c3f74405dee0a57a17 100644 --- a/VectoCore/InputData/FileIO/Reader/DrivingCycleDataReader.cs +++ b/VectoCore/InputData/Reader/DrivingCycleDataReader.cs @@ -9,7 +9,7 @@ using TUGraz.VectoCore.Models; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Utils; -namespace TUGraz.VectoCore.InputData.FileIO.Reader +namespace TUGraz.VectoCore.InputData.Reader { public class DrivingCycleDataReader : LoggingObject { diff --git a/VectoCore/InputData/Reader/Impl/AbstractVectoRunDataFactory.cs b/VectoCore/InputData/Reader/Impl/AbstractVectoRunDataFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..4e1ef2950b727449047637f49329dc49aebc663b --- /dev/null +++ b/VectoCore/InputData/Reader/Impl/AbstractVectoRunDataFactory.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using TUGraz.VectoCore.Models.Simulation.Data; + +namespace TUGraz.VectoCore.InputData.Reader.Impl +{ + public abstract class AbstractVectoRunDataFactory : IVectoRunDataFactory + { + public abstract IEnumerable<VectoRunData> NextRun(); + } +} \ No newline at end of file diff --git a/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs b/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..d0bdad2b659812c1837286777ee10fe9e26f1173 --- /dev/null +++ b/VectoCore/InputData/Reader/Impl/DeclarationModeVectoRunDataFactory.cs @@ -0,0 +1,101 @@ +using System.Collections.Generic; +using System.Linq; +using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper; +using TUGraz.VectoCore.Models; +using TUGraz.VectoCore.Models.Declaration; +using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data; +using TUGraz.VectoCore.OutputData.PDF; +using TUGraz.VectoCore.Utils; + +namespace TUGraz.VectoCore.InputData.Reader.Impl +{ + public class DeclarationModeVectoRunDataFactory : LoggingObject, IVectoRunDataFactory + { + protected static Dictionary<MissionType, DrivingCycleData> CyclesCache = + new Dictionary<MissionType, DrivingCycleData>(); + + protected IInputDataProvider InputDataProvider; + + protected DeclarationReport Report; + + internal DeclarationModeVectoRunDataFactory(IInputDataProvider dataProvider, DeclarationReport report) + { + InputDataProvider = dataProvider; + Report = report; + } + + public IEnumerable<VectoRunData> NextRun() + { + var dao = new DeclarationDataAdapter(); + var segment = GetVehicleClassification(InputDataProvider.VehicleInputData.VehicleCategory, + InputDataProvider.VehicleInputData.AxleConfiguration, + InputDataProvider.VehicleInputData.GrossVehicleMassRating, InputDataProvider.VehicleInputData.CurbWeight); + var driverdata = dao.CreateDriverData(InputDataProvider.DriverInputData); + driverdata.AccelerationCurve = AccelerationCurveData.ReadFromStream(segment.AccelerationFile); + + var engineData = dao.CreateEngineData(InputDataProvider.EngineInputData); + + var gearboxData = dao.CreateGearboxData(InputDataProvider.GearboxInputData, engineData); + + ConfigureReport(engineData, gearboxData, segment); + + foreach (var mission in segment.Missions) { + DrivingCycleData cycle; + if (CyclesCache.ContainsKey(mission.MissionType)) { + cycle = CyclesCache[mission.MissionType]; + } else { + cycle = DrivingCycleDataReader.ReadFromStream(mission.CycleFile, CycleType.DistanceBased); + CyclesCache.Add(mission.MissionType, cycle); + } + foreach (var loading in mission.Loadings) { + var simulationRunData = new VectoRunData { + Loading = loading.Key, + VehicleData = dao.CreateVehicleData(InputDataProvider.VehicleInputData, mission, loading.Value), + EngineData = engineData, + GearboxData = dao.CreateGearboxData(InputDataProvider.GearboxInputData, engineData), + AxleGearData = dao.CreateAxleGearData(InputDataProvider.AxleGearInputData), + Aux = + dao.CreateAuxiliaryData(InputDataProvider.AuxiliaryInputData(), mission.MissionType, + segment.VehicleClass), + Cycle = cycle, + Retarder = dao.CreateRetarderData(InputDataProvider.RetarderInputData), + DriverData = driverdata, + IsEngineOnly = false, // InputDataProvider.JobInputData().EngineOnlyMode, + JobName = InputDataProvider.JobInputData().JobName, + ModFileSuffix = loading.Key.ToString(), + Report = Report, + Mission = mission, + }; + simulationRunData.EngineData.WHTCCorrectionFactor = DeclarationData.WHTCCorrection.Lookup(mission.MissionType, + engineData.WHTCRural.Value(), engineData.WHTCUrban.Value(), engineData.WHTCMotorway.Value()); + simulationRunData.Cycle.Name = mission.MissionType.ToString(); + simulationRunData.VehicleData.VehicleClass = segment.VehicleClass; + yield return simulationRunData; + } + } + } + + private void ConfigureReport(CombustionEngineData engineData, GearboxData gearboxData, Segment segment) + { + if (Report == null) { + return; + } + Report.EngineModel = engineData.ModelName; + Report.EngineStr = string.Format("{0} l, {1} kW", + engineData.Displacement.ConvertTo().Cubic.Dezi.Meter.ToOutputFormat(1), + engineData.FullLoadCurve.MaxPower.ConvertTo().Kilo.Watt.ToOutputFormat(0)); + Report.Flc = engineData.FullLoadCurve; + Report.GearboxModel = gearboxData.ModelName; + Report.GearboxStr = string.Format("{0}-Speed {1}", gearboxData.Gears.Count, gearboxData.Type); + Report.Segment = segment; + Report.ResultCount = segment.Missions.Sum(m => m.Loadings.Count); + } + + internal Segment GetVehicleClassification(VehicleCategory category, AxleConfiguration axles, Kilogram grossMassRating, + Kilogram curbWeight) + { + return DeclarationData.Segments.Lookup(category, axles, grossMassRating, curbWeight); + } + } +} \ No newline at end of file diff --git a/VectoCore/InputData/FileIO/Reader/Impl/EngineOnlyVectoRunDataFactory.cs b/VectoCore/InputData/Reader/Impl/EngineOnlyVectoRunDataFactory.cs similarity index 62% rename from VectoCore/InputData/FileIO/Reader/Impl/EngineOnlyVectoRunDataFactory.cs rename to VectoCore/InputData/Reader/Impl/EngineOnlyVectoRunDataFactory.cs index d7dc46563772289eae4348c64192526452823d38..bc60282279cacc679cbe17674df012a883029348 100644 --- a/VectoCore/InputData/FileIO/Reader/Impl/EngineOnlyVectoRunDataFactory.cs +++ b/VectoCore/InputData/Reader/Impl/EngineOnlyVectoRunDataFactory.cs @@ -1,12 +1,9 @@ using System.Collections.Generic; -using System.IO; -using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.InputData.FileIO.EngineeringFile; -using TUGraz.VectoCore.InputData.FileIO.Reader.DataObjectAdaper; +using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; -namespace TUGraz.VectoCore.InputData.FileIO.Reader.Impl +namespace TUGraz.VectoCore.InputData.Reader.Impl { public class EngineOnlyVectoRunDataFactory : EngineeringModeVectoRunDataFactory { @@ -21,7 +18,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.Reader.Impl var dao = new EngineeringDataAdapter(); foreach (var cycle in InputDataProvider.JobInputData().Cycles) { var simulationRunData = new VectoRunData { - //BasePath = job.BasePath, JobName = InputDataProvider.JobInputData().JobName, EngineData = dao.CreateEngineData(InputDataProvider.EngineInputData), Cycle = DrivingCycleDataReader.Create(cycle.CycleData, cycle.Name, CycleType.EngineOnly), @@ -31,17 +27,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.Reader.Impl } } - //protected override void ProcessJob(VectoJobFile vectoJob) - //{ - // var declaration = vectoJob as VectoJobFileV2Engineering; - // if (declaration == null) { - // throw new VectoException("Unhandled Job File Format"); - // } - // var job = declaration; - - // Engine = ReadEngine(Path.Combine(job.BasePath, job.Body.EngineFile)); - //} - public bool IsEngineOnly { get { return true; } diff --git a/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs b/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..8f5cb00606455e26e1596ff62a0802c439b0d7bb --- /dev/null +++ b/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper; +using TUGraz.VectoCore.Models; +using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.Models.SimulationComponent.Data; + +[assembly: InternalsVisibleTo("VectoCoreTest")] + +namespace TUGraz.VectoCore.InputData.Reader.Impl +{ + public class EngineeringModeVectoRunDataFactory : LoggingObject, IVectoRunDataFactory + { + protected DriverData Driver; + + protected IInputDataProvider InputDataProvider; + + internal EngineeringModeVectoRunDataFactory(IInputDataProvider dataProvider) + { + InputDataProvider = dataProvider; + } + + /// <summary> + /// Iterate over all cycles defined in the JobFile and create a container with all data required for creating a simulation run + /// </summary> + /// <returns>VectoRunData instance for initializing the powertrain.</returns> + public virtual IEnumerable<VectoRunData> NextRun() + { + var dao = new EngineeringDataAdapter(); + var driver = dao.CreateDriverData(InputDataProvider.DriverInputData); + var engineData = dao.CreateEngineData(InputDataProvider.EngineInputData); + + foreach (var cycle in InputDataProvider.JobInputData().Cycles) { + var simulationRunData = new VectoRunData { + JobName = InputDataProvider.JobInputData().JobName, + EngineData = engineData, + GearboxData = dao.CreateGearboxData(InputDataProvider.GearboxInputData, engineData), + AxleGearData = dao.CreateAxleGearData(InputDataProvider.AxleGearInputData), + VehicleData = dao.CreateVehicleData(InputDataProvider.VehicleInputData), + DriverData = driver, + Aux = dao.CreateAuxiliaryData(InputDataProvider.AuxiliaryInputData()), + Retarder = dao.CreateRetarderData(InputDataProvider.RetarderInputData), + // TODO: distance or time-based cycle! + Cycle = + DrivingCycleDataReader.Create(cycle.CycleData, cycle.Name, CycleType.DistanceBased), + IsEngineOnly = InputDataProvider.JobInputData().EngineOnlyMode + }; + yield return simulationRunData; + } + } + } +} \ No newline at end of file diff --git a/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs b/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs index 5d49290167770b01de8bd7cd73c4f15fa5b14777..3e128d2c88a793df9fdfb44a3e4c06877e40b1ff 100644 --- a/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs +++ b/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs @@ -6,8 +6,7 @@ using System.Threading; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.InputData; -using TUGraz.VectoCore.InputData.FileIO.Reader; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; +using TUGraz.VectoCore.InputData.Reader.Impl; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.OutputData; diff --git a/VectoCore/VectoCore.csproj b/VectoCore/VectoCore.csproj index 2c6e1b1c6b477533a1edab83997d5431e14381f7..1defc000d3219b5cb17d418dd5a379328f139d65 100644 --- a/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore.csproj @@ -109,15 +109,6 @@ <Compile Include="Configuration\Constants.cs" /> <Compile Include="Exceptions\VectoExceptions.cs" /> <Compile Include="Exceptions\VectoSimulationException.cs" /> - <Compile Include="InputData\FileIO\DeclarationFile\EngineFileDecl.cs" /> - <Compile Include="InputData\FileIO\DeclarationFile\GearboxFileDecl.cs" /> - <Compile Include="InputData\FileIO\DeclarationFile\JobFileDecl.cs" /> - <Compile Include="InputData\FileIO\DeclarationFile\VehicleFileDecl.cs" /> - <Compile Include="InputData\FileIO\EngineeringFile\EngineFileEng.cs" /> - <Compile Include="InputData\FileIO\EngineeringFile\GearboxFileEng.cs" /> - <Compile Include="InputData\FileIO\EngineeringFile\JobFileEng.cs" /> - <Compile Include="InputData\FileIO\EngineeringFile\VehicleFileEng.cs" /> - <Compile Include="InputData\FileIO\Reader\DataObjectAdaper\EngineOnlyDataAdapter.cs" /> <Compile Include="InputData\Impl\InputData.cs" /> <Compile Include="InputData\FileIO\InputFileReader.cs" /> <Compile Include="InputData\FileIO\JsonDataHeader.cs" /> @@ -126,18 +117,18 @@ <Compile Include="InputData\FileIO\JSON\JSONInputData.cs" /> <Compile Include="InputData\FileIO\JSON\JSONInputDataFactory.cs" /> <Compile Include="InputData\FileIO\JSON\JSONVehicleData.cs" /> - <Compile Include="InputData\FileIO\Reader\DataObjectAdaper\AbstractSimulationDataAdapter.cs" /> - <Compile Include="InputData\FileIO\Reader\DataObjectAdaper\DeclarationDataAdapter.cs" /> - <Compile Include="InputData\FileIO\Reader\DataObjectAdaper\EngineeringDataAdapter.cs" /> - <Compile Include="InputData\FileIO\Reader\DrivingCycleDataReader.cs" /> - <Compile Include="InputData\FileIO\Reader\Impl\AbstractVectoRunDataFactory.cs" /> - <Compile Include="InputData\FileIO\Reader\Impl\DeclarationModeVectoRunDataFactory.cs" /> - <Compile Include="InputData\FileIO\Reader\Impl\EngineeringModeVectoRunDataFactory.cs" /> - <Compile Include="InputData\FileIO\Reader\Impl\EngineOnlyVectoRunDataFactory.cs" /> <Compile Include="InputData\FileIO\VectoFiles.cs" /> <Compile Include="InputData\IInputDataProvider.cs" /> <Compile Include="InputData\InputData.cs" /> <Compile Include="InputData\IVectoRunDataFactory.cs" /> + <Compile Include="InputData\Reader\DataObjectAdaper\AbstractSimulationDataAdapter.cs" /> + <Compile Include="InputData\Reader\DataObjectAdaper\DeclarationDataAdapter.cs" /> + <Compile Include="InputData\Reader\DataObjectAdaper\EngineeringDataAdapter.cs" /> + <Compile Include="InputData\Reader\DrivingCycleDataReader.cs" /> + <Compile Include="InputData\Reader\Impl\AbstractVectoRunDataFactory.cs" /> + <Compile Include="InputData\Reader\Impl\DeclarationModeVectoRunDataFactory.cs" /> + <Compile Include="InputData\Reader\Impl\EngineeringModeVectoRunDataFactory.cs" /> + <Compile Include="InputData\Reader\Impl\EngineOnlyVectoRunDataFactory.cs" /> <Compile Include="Models\Connector\Ports\IDriverDemandPort.cs" /> <Compile Include="Models\Connector\Ports\IDrivingCyclePort.cs" /> <Compile Include="Models\Connector\Ports\IResponse.cs" /> diff --git a/VectoCoreTest/FileIO/SimulationDataReaderTest.cs b/VectoCoreTest/FileIO/SimulationDataReaderTest.cs index a13ea76651f4c11c1423a0cac1157f110f5360cf..a327209cb2fd3de35ae60c16484d2c2a9cc82543 100644 --- a/VectoCoreTest/FileIO/SimulationDataReaderTest.cs +++ b/VectoCoreTest/FileIO/SimulationDataReaderTest.cs @@ -2,7 +2,7 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.InputData.FileIO.JSON; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; +using TUGraz.VectoCore.InputData.Reader.Impl; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Utils; diff --git a/VectoCoreTest/Integration/CoachPowerTrain.cs b/VectoCoreTest/Integration/CoachPowerTrain.cs index a560f3933083a256dcf2d04d930f42067ad86e7a..5966cbbb11fdc5b9652dd87a8908c4a090c6091f 100644 --- a/VectoCoreTest/Integration/CoachPowerTrain.cs +++ b/VectoCoreTest/Integration/CoachPowerTrain.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Impl; diff --git a/VectoCoreTest/Integration/EngineOnlyCycle/EngineOnlyCycleTest.cs b/VectoCoreTest/Integration/EngineOnlyCycle/EngineOnlyCycleTest.cs index fb2ed49904a0954f7a06de16c1d5f6197f72216a..4cb764b8eb6fb91a0ec15727728e501cacbcdad6 100644 --- a/VectoCoreTest/Integration/EngineOnlyCycle/EngineOnlyCycleTest.cs +++ b/VectoCoreTest/Integration/EngineOnlyCycle/EngineOnlyCycleTest.cs @@ -3,8 +3,7 @@ using System.IO; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Configuration; -using TUGraz.VectoCore.InputData.FileIO.Reader; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Impl; diff --git a/VectoCoreTest/Integration/SimpleDrivingCycles.cs b/VectoCoreTest/Integration/SimpleDrivingCycles.cs index 32ed5480885b31925e74205076bd8aeaf6b49738..ad9ef6a1c7343c7d252fce99071d021ed28d321e 100644 --- a/VectoCoreTest/Integration/SimpleDrivingCycles.cs +++ b/VectoCoreTest/Integration/SimpleDrivingCycles.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; using System.IO; -using TUGraz.VectoCore.InputData.FileIO.Reader; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Utils; diff --git a/VectoCoreTest/Integration/SimulationRuns/FullPowertrain.cs b/VectoCoreTest/Integration/SimulationRuns/FullPowertrain.cs index 563d047a9d6661af784df9f86fa3d61cc6b75258..fe4e5d05803a57a31d2e45aeb448e977b9e8499f 100644 --- a/VectoCoreTest/Integration/SimulationRuns/FullPowertrain.cs +++ b/VectoCoreTest/Integration/SimulationRuns/FullPowertrain.cs @@ -5,8 +5,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using NLog; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.InputData.FileIO.JSON; -using TUGraz.VectoCore.InputData.FileIO.Reader; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.Connector.Ports; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Declaration; diff --git a/VectoCoreTest/Integration/SimulationRuns/MinimalPowertrain.cs b/VectoCoreTest/Integration/SimulationRuns/MinimalPowertrain.cs index 04ee06617ddabf4f4b6021058383ed2ee4b4e7cf..fa8a0bca1027ec9806aea83a49dd55f33a7b5329 100644 --- a/VectoCoreTest/Integration/SimulationRuns/MinimalPowertrain.cs +++ b/VectoCoreTest/Integration/SimulationRuns/MinimalPowertrain.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Configuration; -using TUGraz.VectoCore.InputData.FileIO.Reader; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.Connector.Ports; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Declaration; diff --git a/VectoCoreTest/Integration/Truck40tPowerTrain.cs b/VectoCoreTest/Integration/Truck40tPowerTrain.cs index fd2e03cdea85b1703ea9d3f3725d3957c83dfe00..8801499046319224e3ba1d2451e0aea3745f55c7 100644 --- a/VectoCoreTest/Integration/Truck40tPowerTrain.cs +++ b/VectoCoreTest/Integration/Truck40tPowerTrain.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Impl; diff --git a/VectoCoreTest/Models/Simulation/AuxTests.cs b/VectoCoreTest/Models/Simulation/AuxTests.cs index af7acc1a1eb12a089336044d2120f2fca23c1ca5..03932c1c1797a59b2ed0c1e9fea2ecf746f35979 100644 --- a/VectoCoreTest/Models/Simulation/AuxTests.cs +++ b/VectoCoreTest/Models/Simulation/AuxTests.cs @@ -6,7 +6,7 @@ using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Impl; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.InputData.FileIO.JSON; -using TUGraz.VectoCore.InputData.FileIO.Reader; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Impl; using TUGraz.VectoCore.OutputData; diff --git a/VectoCoreTest/Models/Simulation/DrivingCycleTests.cs b/VectoCoreTest/Models/Simulation/DrivingCycleTests.cs index 06dfba3ada35107facabe3db83be5f5e9c0471a2..b1ce85371b9e9dcfbfc2a3e05883eed2752a6a27 100644 --- a/VectoCoreTest/Models/Simulation/DrivingCycleTests.cs +++ b/VectoCoreTest/Models/Simulation/DrivingCycleTests.cs @@ -1,6 +1,6 @@ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TUGraz.VectoCore.InputData.FileIO.Reader; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; diff --git a/VectoCoreTest/Models/Simulation/PowerTrainBuilderTest.cs b/VectoCoreTest/Models/Simulation/PowerTrainBuilderTest.cs index 283839d01ff3fb7dfea0a10380e63edaa940bbb8..a525fa34f2f0c02ef2d1d077b349b906931b33b7 100644 --- a/VectoCoreTest/Models/Simulation/PowerTrainBuilderTest.cs +++ b/VectoCoreTest/Models/Simulation/PowerTrainBuilderTest.cs @@ -1,7 +1,7 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.InputData.FileIO.JSON; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; +using TUGraz.VectoCore.InputData.Reader.Impl; using TUGraz.VectoCore.Models.Connector.Ports; using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCore.Models.Simulation.Impl; diff --git a/VectoCoreTest/Models/Simulation/VechicleContainerTests.cs b/VectoCoreTest/Models/Simulation/VechicleContainerTests.cs index 8a3146c000e285a0c0ebfedebc540ea98ebf3325..a6a5cb4a3a01e5c4c2ab0c036e5a7011facafc8f 100644 --- a/VectoCoreTest/Models/Simulation/VechicleContainerTests.cs +++ b/VectoCoreTest/Models/Simulation/VechicleContainerTests.cs @@ -1,5 +1,4 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Impl; using TUGraz.VectoCore.Tests.Utils; diff --git a/VectoCoreTest/Models/SimulationComponent/ClutchTest.cs b/VectoCoreTest/Models/SimulationComponent/ClutchTest.cs index d2cfafe4ecf67cccb1a9254b864448c423fb0d10..b6d3cc01de6940a187494097d73798ccaa682584 100644 --- a/VectoCoreTest/Models/SimulationComponent/ClutchTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/ClutchTest.cs @@ -1,6 +1,5 @@ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Connector.Ports; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; diff --git a/VectoCoreTest/Models/SimulationComponent/CombustionEngineTest.cs b/VectoCoreTest/Models/SimulationComponent/CombustionEngineTest.cs index f2544549129861ef7c0fc95b43857cb15622fd8f..a8ba79661fa1465d56e103e7fa994b36baea1df3 100644 --- a/VectoCoreTest/Models/SimulationComponent/CombustionEngineTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/CombustionEngineTest.cs @@ -7,7 +7,6 @@ using System.Reflection; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Connector.Ports; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Simulation.Data; diff --git a/VectoCoreTest/Models/SimulationComponent/DistanceBasedDrivingCycleTest.cs b/VectoCoreTest/Models/SimulationComponent/DistanceBasedDrivingCycleTest.cs index c28999b5d281a366889d95872cea81c1fbddb535..24b00e1644a7041c52c9fcf7e1d06803f938aac0 100644 --- a/VectoCoreTest/Models/SimulationComponent/DistanceBasedDrivingCycleTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/DistanceBasedDrivingCycleTest.cs @@ -1,7 +1,7 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.InputData.FileIO.Reader; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; diff --git a/VectoCoreTest/Models/SimulationComponent/DriverTest.cs b/VectoCoreTest/Models/SimulationComponent/DriverTest.cs index 6560f62314c1e621a7d3cd7678db10acb630d66b..0d75d6567e5d121620c6f75c8864bd4c08ba6e11 100644 --- a/VectoCoreTest/Models/SimulationComponent/DriverTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/DriverTest.cs @@ -3,7 +3,6 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Connector.Ports; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Declaration; diff --git a/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs b/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs index 0395fac3fd4307805fd1947bb6d6869e9ef590a4..515d8ac5aa9b34751fef2c4aacd6b80a0cbafaa0 100644 --- a/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs @@ -3,7 +3,6 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using NLog; using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.Simulation.Impl; diff --git a/VectoCoreTest/Models/SimulationComponent/VehicleTest.cs b/VectoCoreTest/Models/SimulationComponent/VehicleTest.cs index b7f1d6f257a5ceca1c19417d90c82d6f112d8f10..49758472958c971c550baa150bb8a9b976f7ffcb 100644 --- a/VectoCoreTest/Models/SimulationComponent/VehicleTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/VehicleTest.cs @@ -1,6 +1,5 @@ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; diff --git a/VectoCoreTest/Models/SimulationComponent/WheelsTest.cs b/VectoCoreTest/Models/SimulationComponent/WheelsTest.cs index f6dce7b18e7868546171b8841ef4056d7dd2be0a..361544ad7ed574071f91494e6b2767105aa8a831 100644 --- a/VectoCoreTest/Models/SimulationComponent/WheelsTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/WheelsTest.cs @@ -1,6 +1,5 @@ using System; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent; using TUGraz.VectoCore.Models.SimulationComponent.Impl; diff --git a/VectoCoreTest/Models/SimulationComponentData/DistanceCycleDataTest.cs b/VectoCoreTest/Models/SimulationComponentData/DistanceCycleDataTest.cs index d01c2ce1db89277538f0b4f1ba3fe1f5c5560f2c..b8a97d3e3e2757dc1dc5585756038fdb17a5a9f9 100644 --- a/VectoCoreTest/Models/SimulationComponentData/DistanceCycleDataTest.cs +++ b/VectoCoreTest/Models/SimulationComponentData/DistanceCycleDataTest.cs @@ -1,6 +1,6 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TUGraz.VectoCore.InputData.FileIO.Reader; +using TUGraz.VectoCore.InputData.Reader; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Impl; using TUGraz.VectoCore.Utils; diff --git a/VectoCoreTest/Models/SimulationComponentData/GearboxDataTest.cs b/VectoCoreTest/Models/SimulationComponentData/GearboxDataTest.cs index 129af00859f5a321f8dc74ab92ad8fbf089646a2..33a436b2c2c041fc8222a82f325540c595dd9b68 100644 --- a/VectoCoreTest/Models/SimulationComponentData/GearboxDataTest.cs +++ b/VectoCoreTest/Models/SimulationComponentData/GearboxDataTest.cs @@ -1,7 +1,6 @@ using System; using System.Globalization; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TUGraz.VectoCore.InputData.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Tests.Utils; using TUGraz.VectoCore.Utils; diff --git a/VectoCoreTest/Utils/MockSimulationDataFactory.cs b/VectoCoreTest/Utils/MockSimulationDataFactory.cs index 000c45b9b3a171bd46830dffad6a133e4d8be0cb..adf9ee5b6da9aea212df6e5ee7e071ac4ef1533d 100644 --- a/VectoCoreTest/Utils/MockSimulationDataFactory.cs +++ b/VectoCoreTest/Utils/MockSimulationDataFactory.cs @@ -1,6 +1,6 @@ using TUGraz.VectoCore.InputData; using TUGraz.VectoCore.InputData.FileIO.JSON; -using TUGraz.VectoCore.InputData.FileIO.Reader.DataObjectAdaper; +using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper; using TUGraz.VectoCore.Models.SimulationComponent.Data; namespace TUGraz.VectoCore.Tests.Utils