diff --git a/VECTO.sln.DotSettings b/VECTO.sln.DotSettings index 4f0f609125e85e8f93b0ca187d92c473514fb999..da8636e08f14ca7c6cafe1c23d59aeb3afa2c978 100644 --- a/VECTO.sln.DotSettings +++ b/VECTO.sln.DotSettings @@ -30,6 +30,7 @@ <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RP/@EntryIndexedValue">RP</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SI/@EntryIndexedValue">SI</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=WHTC/@EntryIndexedValue">WHTC</s:String> + <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XML/@EntryIndexedValue">XML</s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FCONSTANT/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FVARIABLE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FCONSTRUCTOR/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String> diff --git a/VECTO/GUI/VehicleForm.vb b/VECTO/GUI/VehicleForm.vb index 62243bff153875ca50a38877a8736d4f838a0a02..91237d27a17cb79c12b3ededfc467304ee442908 100644 --- a/VECTO/GUI/VehicleForm.vb +++ b/VECTO/GUI/VehicleForm.vb @@ -359,9 +359,9 @@ Public Class VehicleForm cbAngledriveType.SelectedValue = angledrive.Type - tbAngledriveRatio.Text = angledrive.IAngledriveInputData_Ratio.ToGUIFormat() + tbAngledriveRatio.Text = angledrive.Ratio.ToGUIFormat() tbAngledriveLossMapPath.Text = - If(angledrive.IAngledriveInputData_LossMap Is Nothing, "", GetRelativePath(angledrive.IAngledriveInputData_LossMap.Source, basePath)) + If(angledrive.LossMap Is Nothing, "", GetRelativePath(angledrive.LossMap.Source, basePath)) LvRRC.Items.Clear() Dim i As Integer = 0 diff --git a/VECTO/Input Files/Vehicle.vb b/VECTO/Input Files/Vehicle.vb index e47fe482fdec66ab93c7f5adcc43a265c8eff2cf..61d1da961a58b44b7732a29cbf19e00c38400dc3 100644 --- a/VECTO/Input Files/Vehicle.vb +++ b/VECTO/Input Files/Vehicle.vb @@ -437,36 +437,40 @@ Public Class Vehicle End Get End Property - Public ReadOnly Property IAngledriveInputData_Ratio As Double Implements IAngledriveInputData.IAngledriveInputData_Ratio + Public ReadOnly Property IRetarderInputData_Ratio As Double Implements IRetarderInputData.Ratio Get - Return AngledriveRatio + + Return RetarderRatio End Get End Property - Public ReadOnly Property AngledriveInputDataType As AngledriveType Implements IAngledriveInputData.Type + Public ReadOnly Property Ratio As Double Implements IAngledriveInputData.Ratio Get - Return AngledriveType + Return AngledriveRatio End Get End Property - Public ReadOnly Property Ratio As Double Implements IRetarderInputData.Ratio + Public ReadOnly Property IRetarderInputData_LossMap As TableData Implements IRetarderInputData.LossMap Get - Return RetarderRatio + + Return VectoCSVFile.Read(RetarderLossMapFile.FullPath) End Get End Property - Public ReadOnly Property IAngledriveInputData_LossMap As TableData Implements IAngledriveInputData.IAngledriveInputData_LossMap + Public ReadOnly Property AngledriveInputDataType As AngledriveType Implements IAngledriveInputData.Type Get - Return VectoCSVFile.Read(AngledriveLossMapFile.FullPath) + Return AngledriveType End Get End Property - Public ReadOnly Property LossMap As TableData Implements IRetarderInputData.LossMap + + Public ReadOnly Property LossMap As TableData Implements IAngledriveInputData.LossMap Get - Return VectoCSVFile.Read(RetarderLossMapFile.FullPath) + Return VectoCSVFile.Read(AngledriveLossMapFile.FullPath) End Get End Property + Public ReadOnly Property Efficiency As Double Implements IAngledriveInputData.Efficiency Get Return If(IsNumeric(AngledriveLossMapFile.OriginalPath), AngledriveLossMapFile.OriginalPath.ToDouble(), -1.0) @@ -477,20 +481,20 @@ Public Class Vehicle Public ReadOnly Property PTOTransmissionType As String Implements IPTOTransmissionInputData.PTOTransmissionType Get - Return PTOType + Return PtoType End Get End Property Public ReadOnly Property IPTOTransmissionInputData_PTOCycle As TableData Implements IPTOTransmissionInputData.PTOCycle Get - Return VectoCSVFile.Read(PTOCycle.FullPath) + Return VectoCSVFile.Read(PtoCycle.FullPath) End Get End Property Public ReadOnly Property IPTOTransmissionInputData_PTOLossMap As TableData _ Implements IPTOTransmissionInputData.PTOLossMap Get - Return VectoCSVFile.Read(PTOLossMap.FullPath) + Return VectoCSVFile.Read(PtoLossMap.FullPath) End Get End Property End Class \ No newline at end of file diff --git a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs index 58ebd0d46da776a960806b4dea14c1a10619778e..3b238b066085f373614eaa5c4f01dfbd896451da 100644 --- a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs +++ b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs @@ -145,12 +145,12 @@ namespace TUGraz.VectoCommon.InputData /// <summary> /// P176 /// </summary> - double IAngledriveInputData_Ratio { get; } + double Ratio { get; } /// <summary> /// P173, P174, P175 /// </summary> - TableData IAngledriveInputData_LossMap { get; } + TableData LossMap { get; } /// <summary> /// P177 diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs index 36fa97ad0557840f7c3bbe7e804f36e9d3f18888..d4499f50ea004cec9de9b3345708259dbf7ff1be 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONVehicleData.cs @@ -180,12 +180,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON } } - double IAngledriveInputData.IAngledriveInputData_Ratio + double IAngledriveInputData.Ratio { get { return Body.GetEx(JsonKeys.Vehicle_Angledrive).GetEx<double>(JsonKeys.Vehicle_Angledrive_Ratio); } } - TableData IAngledriveInputData.IAngledriveInputData_LossMap + TableData IAngledriveInputData.LossMap { get { diff --git a/VectoCore/VectoCore/InputData/Reader/ComponentData/PTOIdleLossMapReader.cs b/VectoCore/VectoCore/InputData/Reader/ComponentData/PTOIdleLossMapReader.cs index 8608e55b84fb415eb908d5307a249d7ef4c553fb..ef2e843c343d63b9d4548377517c69ba3ac56e48 100644 --- a/VectoCore/VectoCore/InputData/Reader/ComponentData/PTOIdleLossMapReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ComponentData/PTOIdleLossMapReader.cs @@ -54,7 +54,7 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData }).OrderBy(e => e.EngineSpeed).ToArray()); } - private static class Fields + public static class Fields { /// <summary> /// [rpm] diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/AbstractSimulationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/AbstractSimulationDataAdapter.cs index 46065fe6837898415cb2c64c1e145161331d1f40..b4299036326dfca0694c36f74b9f59b35cd903cb 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/AbstractSimulationDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/AbstractSimulationDataAdapter.cs @@ -191,17 +191,17 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter DigestValue = data.DigestValue, IntegrityStatus = data.IntegrityStatus, Type = type, - Angledrive = new TransmissionData { Ratio = data.IAngledriveInputData_Ratio } + Angledrive = new TransmissionData { Ratio = data.Ratio } }; try { - angledriveData.Angledrive.LossMap = TransmissionLossMapReader.Create(data.IAngledriveInputData_LossMap, - data.IAngledriveInputData_Ratio, "Angledrive"); + angledriveData.Angledrive.LossMap = TransmissionLossMapReader.Create(data.LossMap, + data.Ratio, "Angledrive"); } catch (VectoException ex) { Log.Info("Angledrive Loss Map not found."); if (useEfficiencyFallback) { Log.Info("Angledrive Trying with Efficiency instead of Loss Map."); angledriveData.Angledrive.LossMap = TransmissionLossMapReader.Create(data.Efficiency, - data.IAngledriveInputData_Ratio, "Angledrive"); + data.Ratio, "Angledrive"); } else { throw new VectoException("Angledrive: LossMap not found.", ex); } diff --git a/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs b/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs index 4135a1163e1e246b1d5492ce7eef436ccccd224b..3b8c7eedc9062c08f6c967825db663885a420adc 100644 --- a/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/DrivingCycleDataReader.cs @@ -300,7 +300,7 @@ namespace TUGraz.VectoCore.InputData.Reader return true; } - private static class Fields + public static class Fields { public const string PTOTorque = "PTO Torque"; public const string EngineSpeedFull = "Engine Speed"; diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs index e7b4064c33310cb30598e77336179bc62dd94ed3..1fd9e7bbf913cd459c276207f22deedb0533a260 100644 --- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs @@ -38,6 +38,7 @@ using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; +using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.Declaration { @@ -196,6 +197,7 @@ namespace TUGraz.VectoCore.Models.Declaration public const double DecisionFactorCoastingScaling = 1.5; public const double LookAheadDistanceFactor = 10; public static readonly MeterPerSecond MinimumSpeed = 50.KMPHtoMeterPerSecond(); + } public static class OverSpeedEcoRoll diff --git a/VectoCore/VectoCore/Models/Declaration/LACDecisionFactor.cs b/VectoCore/VectoCore/Models/Declaration/LACDecisionFactor.cs index bb91fd2e35d28a6dfa59dcca384f4200b60f35aa..8ec563f1c0e716a91bc090e525ec9d67e0abfb1e 100644 --- a/VectoCore/VectoCore/Models/Declaration/LACDecisionFactor.cs +++ b/VectoCore/VectoCore/Models/Declaration/LACDecisionFactor.cs @@ -69,7 +69,7 @@ namespace TUGraz.VectoCore.Models.Declaration return _offset - _scaling * _vTarget.Lookup(targetVelocity) * _vDrop.Lookup(velocityDrop); } - private sealed class LACDecisionFactorVdrop : LookupData<MeterPerSecond, double> + public sealed class LACDecisionFactorVdrop : LookupData<MeterPerSecond, double> { protected override string ResourceId { @@ -116,14 +116,14 @@ namespace TUGraz.VectoCore.Models.Declaration } } - private static class Fields + public static class Fields { public const string DecisionFactor = "decision_factor"; public const string VelocityDrop = "v_drop"; } } - private sealed class LACDecisionFactorVTarget : LookupData<MeterPerSecond, double> + public sealed class LACDecisionFactorVTarget : LookupData<MeterPerSecond, double> { protected override string ResourceId { @@ -170,7 +170,7 @@ namespace TUGraz.VectoCore.Models.Declaration } } - private static class Fields + public static class Fields { public const string TargetVelocity = "v_target"; public const string DecisionFactor = "decision_factor";