diff --git a/VectoCore/Models/SimulationComponent/Data/EngineOnlyDrivingCycle.cs b/VectoCore/Models/SimulationComponent/Data/EngineOnlyDrivingCycle.cs index 34493133b70cd6edbc186b3227bf2dd8c5a684a7..c52472262d02af4787f02ec2fcc9641c0086f194 100644 --- a/VectoCore/Models/SimulationComponent/Data/EngineOnlyDrivingCycle.cs +++ b/VectoCore/Models/SimulationComponent/Data/EngineOnlyDrivingCycle.cs @@ -21,6 +21,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data /// </remarks> public class EngineOnlyDrivingCycle { + private static class Fields + { + public const string Pe = "Pe"; + public const string Padd = "Padd"; + public const string Me = "Me"; + public const string n = "n"; + } + /// <summary> /// Engine Speed /// </summary> @@ -56,15 +64,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data foreach (DataRow row in data.Rows) { var cycle = new EngineOnlyDrivingCycle(); - cycle.EngineSpeed = row.GetDouble("n"); + cycle.EngineSpeed = row.GetDouble(Fields.n); - if (data.Columns.Contains("Pe")) - cycle.PowerEngine = row.GetDouble("Pe"); + if (data.Columns.Contains(Fields.Pe)) + cycle.PowerEngine = row.GetDouble(Fields.Pe); else - cycle.Torque = row.GetDouble("Me"); + cycle.Torque = row.GetDouble(Fields.Me); - if (data.Columns.Contains("Padd")) - cycle.Padd = row.GetDouble("Padd"); + if (data.Columns.Contains(Fields.Padd)) + cycle.Padd = row.GetDouble(Fields.Padd); cycles.Add(cycle); } diff --git a/VectoCore/VectoCore.csproj b/VectoCore/VectoCore.csproj index d71d5331d2c218a80fb9afe1f76012d01a779444..e423382077accab1e0dc38e182284fde574bd960 100644 --- a/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore.csproj @@ -68,9 +68,7 @@ <Compile Include="Models\Connector\Ports\IOutShaft.cs" /> <Compile Include="Models\Connector\Ports\ITnPort.cs" /> <Compile Include="Models\SimulationComponent\Data\EngineOnlyDrivingCycle.cs" /> - <Compile Include="Models\SimulationComponent\Data\ModalResultField.cs"> - <SubType>Component</SubType> - </Compile> + <Compile Include="Models\SimulationComponent\Data\ModalResult.cs" /> <Compile Include="Models\SimulationComponent\Data\CombustionEngineData.cs" /> <Compile Include="Models\SimulationComponent\Data\Engine\FuelConsumptionMap.cs" /> <Compile Include="Models\SimulationComponent\Data\Engine\FullLoadCurve.cs" />