Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit ec8f690e authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

Merge pull request #260 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:develop to develop

* commit '42a1a13c':
  undo renaming of methods during refactoring, make static fields accessible
parents b927329b 42a1a13c
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ ...@@ -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/=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/=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/=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">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FCONSTANT/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FVARIABLE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FVARIABLE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FCONSTRUCTOR/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String> <s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FCONSTRUCTOR/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
......
...@@ -359,9 +359,9 @@ Public Class VehicleForm ...@@ -359,9 +359,9 @@ Public Class VehicleForm
cbAngledriveType.SelectedValue = angledrive.Type cbAngledriveType.SelectedValue = angledrive.Type
tbAngledriveRatio.Text = angledrive.IAngledriveInputData_Ratio.ToGUIFormat() tbAngledriveRatio.Text = angledrive.Ratio.ToGUIFormat()
tbAngledriveLossMapPath.Text = 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() LvRRC.Items.Clear()
Dim i As Integer = 0 Dim i As Integer = 0
......
...@@ -437,36 +437,40 @@ Public Class Vehicle ...@@ -437,36 +437,40 @@ Public Class Vehicle
End Get End Get
End Property End Property
Public ReadOnly Property IAngledriveInputData_Ratio As Double Implements IAngledriveInputData.IAngledriveInputData_Ratio Public ReadOnly Property IRetarderInputData_Ratio As Double Implements IRetarderInputData.Ratio
Get Get
Return AngledriveRatio
Return RetarderRatio
End Get End Get
End Property End Property
Public ReadOnly Property AngledriveInputDataType As AngledriveType Implements IAngledriveInputData.Type Public ReadOnly Property Ratio As Double Implements IAngledriveInputData.Ratio
Get Get
Return AngledriveType Return AngledriveRatio
End Get End Get
End Property End Property
Public ReadOnly Property Ratio As Double Implements IRetarderInputData.Ratio Public ReadOnly Property IRetarderInputData_LossMap As TableData Implements IRetarderInputData.LossMap
Get Get
Return RetarderRatio
Return VectoCSVFile.Read(RetarderLossMapFile.FullPath)
End Get End Get
End Property End Property
Public ReadOnly Property IAngledriveInputData_LossMap As TableData Implements IAngledriveInputData.IAngledriveInputData_LossMap Public ReadOnly Property AngledriveInputDataType As AngledriveType Implements IAngledriveInputData.Type
Get Get
Return VectoCSVFile.Read(AngledriveLossMapFile.FullPath) Return AngledriveType
End Get End Get
End Property End Property
Public ReadOnly Property LossMap As TableData Implements IRetarderInputData.LossMap
Public ReadOnly Property LossMap As TableData Implements IAngledriveInputData.LossMap
Get Get
Return VectoCSVFile.Read(RetarderLossMapFile.FullPath) Return VectoCSVFile.Read(AngledriveLossMapFile.FullPath)
End Get End Get
End Property End Property
Public ReadOnly Property Efficiency As Double Implements IAngledriveInputData.Efficiency Public ReadOnly Property Efficiency As Double Implements IAngledriveInputData.Efficiency
Get Get
Return If(IsNumeric(AngledriveLossMapFile.OriginalPath), AngledriveLossMapFile.OriginalPath.ToDouble(), -1.0) Return If(IsNumeric(AngledriveLossMapFile.OriginalPath), AngledriveLossMapFile.OriginalPath.ToDouble(), -1.0)
...@@ -477,20 +481,20 @@ Public Class Vehicle ...@@ -477,20 +481,20 @@ Public Class Vehicle
Public ReadOnly Property PTOTransmissionType As String Implements IPTOTransmissionInputData.PTOTransmissionType Public ReadOnly Property PTOTransmissionType As String Implements IPTOTransmissionInputData.PTOTransmissionType
Get Get
Return PTOType Return PtoType
End Get End Get
End Property End Property
Public ReadOnly Property IPTOTransmissionInputData_PTOCycle As TableData Implements IPTOTransmissionInputData.PTOCycle Public ReadOnly Property IPTOTransmissionInputData_PTOCycle As TableData Implements IPTOTransmissionInputData.PTOCycle
Get Get
Return VectoCSVFile.Read(PTOCycle.FullPath) Return VectoCSVFile.Read(PtoCycle.FullPath)
End Get End Get
End Property End Property
Public ReadOnly Property IPTOTransmissionInputData_PTOLossMap As TableData _ Public ReadOnly Property IPTOTransmissionInputData_PTOLossMap As TableData _
Implements IPTOTransmissionInputData.PTOLossMap Implements IPTOTransmissionInputData.PTOLossMap
Get Get
Return VectoCSVFile.Read(PTOLossMap.FullPath) Return VectoCSVFile.Read(PtoLossMap.FullPath)
End Get End Get
End Property End Property
End Class End Class
\ No newline at end of file
...@@ -145,12 +145,12 @@ namespace TUGraz.VectoCommon.InputData ...@@ -145,12 +145,12 @@ namespace TUGraz.VectoCommon.InputData
/// <summary> /// <summary>
/// P176 /// P176
/// </summary> /// </summary>
double IAngledriveInputData_Ratio { get; } double Ratio { get; }
/// <summary> /// <summary>
/// P173, P174, P175 /// P173, P174, P175
/// </summary> /// </summary>
TableData IAngledriveInputData_LossMap { get; } TableData LossMap { get; }
/// <summary> /// <summary>
/// P177 /// P177
......
...@@ -180,12 +180,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON ...@@ -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); } get { return Body.GetEx(JsonKeys.Vehicle_Angledrive).GetEx<double>(JsonKeys.Vehicle_Angledrive_Ratio); }
} }
TableData IAngledriveInputData.IAngledriveInputData_LossMap TableData IAngledriveInputData.LossMap
{ {
get get
{ {
......
...@@ -54,7 +54,7 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData ...@@ -54,7 +54,7 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData
}).OrderBy(e => e.EngineSpeed).ToArray()); }).OrderBy(e => e.EngineSpeed).ToArray());
} }
private static class Fields public static class Fields
{ {
/// <summary> /// <summary>
/// [rpm] /// [rpm]
......
...@@ -191,17 +191,17 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter ...@@ -191,17 +191,17 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
DigestValue = data.DigestValue, DigestValue = data.DigestValue,
IntegrityStatus = data.IntegrityStatus, IntegrityStatus = data.IntegrityStatus,
Type = type, Type = type,
Angledrive = new TransmissionData { Ratio = data.IAngledriveInputData_Ratio } Angledrive = new TransmissionData { Ratio = data.Ratio }
}; };
try { try {
angledriveData.Angledrive.LossMap = TransmissionLossMapReader.Create(data.IAngledriveInputData_LossMap, angledriveData.Angledrive.LossMap = TransmissionLossMapReader.Create(data.LossMap,
data.IAngledriveInputData_Ratio, "Angledrive"); data.Ratio, "Angledrive");
} catch (VectoException ex) { } catch (VectoException ex) {
Log.Info("Angledrive Loss Map not found."); Log.Info("Angledrive Loss Map not found.");
if (useEfficiencyFallback) { if (useEfficiencyFallback) {
Log.Info("Angledrive Trying with Efficiency instead of Loss Map."); Log.Info("Angledrive Trying with Efficiency instead of Loss Map.");
angledriveData.Angledrive.LossMap = TransmissionLossMapReader.Create(data.Efficiency, angledriveData.Angledrive.LossMap = TransmissionLossMapReader.Create(data.Efficiency,
data.IAngledriveInputData_Ratio, "Angledrive"); data.Ratio, "Angledrive");
} else { } else {
throw new VectoException("Angledrive: LossMap not found.", ex); throw new VectoException("Angledrive: LossMap not found.", ex);
} }
......
...@@ -300,7 +300,7 @@ namespace TUGraz.VectoCore.InputData.Reader ...@@ -300,7 +300,7 @@ namespace TUGraz.VectoCore.InputData.Reader
return true; return true;
} }
private static class Fields public static class Fields
{ {
public const string PTOTorque = "PTO Torque"; public const string PTOTorque = "PTO Torque";
public const string EngineSpeedFull = "Engine Speed"; public const string EngineSpeedFull = "Engine Speed";
......
...@@ -38,6 +38,7 @@ using TUGraz.VectoCommon.Models; ...@@ -38,6 +38,7 @@ using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils; using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.Models.Declaration namespace TUGraz.VectoCore.Models.Declaration
{ {
...@@ -196,6 +197,7 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -196,6 +197,7 @@ namespace TUGraz.VectoCore.Models.Declaration
public const double DecisionFactorCoastingScaling = 1.5; public const double DecisionFactorCoastingScaling = 1.5;
public const double LookAheadDistanceFactor = 10; public const double LookAheadDistanceFactor = 10;
public static readonly MeterPerSecond MinimumSpeed = 50.KMPHtoMeterPerSecond(); public static readonly MeterPerSecond MinimumSpeed = 50.KMPHtoMeterPerSecond();
} }
public static class OverSpeedEcoRoll public static class OverSpeedEcoRoll
......
...@@ -69,7 +69,7 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -69,7 +69,7 @@ namespace TUGraz.VectoCore.Models.Declaration
return _offset - _scaling * _vTarget.Lookup(targetVelocity) * _vDrop.Lookup(velocityDrop); 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 protected override string ResourceId
{ {
...@@ -116,14 +116,14 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -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 DecisionFactor = "decision_factor";
public const string VelocityDrop = "v_drop"; public const string VelocityDrop = "v_drop";
} }
} }
private sealed class LACDecisionFactorVTarget : LookupData<MeterPerSecond, double> public sealed class LACDecisionFactorVTarget : LookupData<MeterPerSecond, double>
{ {
protected override string ResourceId protected override string ResourceId
{ {
...@@ -170,7 +170,7 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -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 TargetVelocity = "v_target";
public const string DecisionFactor = "decision_factor"; public const string DecisionFactor = "decision_factor";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment