Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit f55b10db authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adding missing test files, adding supported simulation type to VectoRunData

parent 20882309
Branches
Tags
No related merge requests found
Showing
with 153 additions and 7 deletions
using System;
namespace TUGraz.VectoCore.InputData.Reader.Impl {
[Flags]
public enum SimulationType
{
None = 0,
EngineOnly = 1 << 0,
DistanceCycle = 1 << 1,
MeasuredSpeedCycle = 1 << 2,
PWheel = 1 << 3,
VerificationTest = 1 << 4
}
}
\ No newline at end of file
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
<Compile Include="Models\LoggingObject.cs" /> <Compile Include="Models\LoggingObject.cs" />
<Compile Include="Models\OperatingPoint.cs" /> <Compile Include="Models\OperatingPoint.cs" />
<Compile Include="Models\RetarderType.cs" /> <Compile Include="Models\RetarderType.cs" />
<Compile Include="Models\SimulationType.cs" />
<Compile Include="Models\VehicleCategory.cs" /> <Compile Include="Models\VehicleCategory.cs" />
<Compile Include="OutputData\IOutputFileWriter.cs" /> <Compile Include="OutputData\IOutputFileWriter.cs" />
<Compile Include="OutputData\IOutputPlugin.cs" /> <Compile Include="OutputData\IOutputPlugin.cs" />
......
...@@ -184,7 +184,9 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl ...@@ -184,7 +184,9 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
PTO = mission.MissionType == MissionType.MunicipalUtility PTO = mission.MissionType == MissionType.MunicipalUtility
? _municipalPtoTransmissionData ? _municipalPtoTransmissionData
: _ptoTransmissionData, : _ptoTransmissionData,
InputDataHash = InputDataProvider.XMLHash InputDataHash = InputDataProvider.XMLHash,
SimulationType = SimulationType.DistanceCycle
}; };
simulationRunData.EngineData.FuelConsumptionCorrectionFactor = DeclarationData.WHTCCorrection.Lookup( simulationRunData.EngineData.FuelConsumptionCorrectionFactor = DeclarationData.WHTCCorrection.Lookup(
mission.MissionType.GetNonEMSMissionType(), _engineData.WHTCRural, _engineData.WHTCUrban, _engineData.WHTCMotorway) * mission.MissionType.GetNonEMSMissionType(), _engineData.WHTCRural, _engineData.WHTCUrban, _engineData.WHTCMotorway) *
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Models;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter; using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
...@@ -54,8 +55,9 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl ...@@ -54,8 +55,9 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
JobName = InputDataProvider.JobInputData.JobName, JobName = InputDataProvider.JobInputData.JobName,
EngineData = dao.CreateEngineData(InputDataProvider.JobInputData.EngineOnly, null, new List<ITorqueLimitInputData>()), EngineData = dao.CreateEngineData(InputDataProvider.JobInputData.EngineOnly, null, new List<ITorqueLimitInputData>()),
Cycle = new DrivingCycleProxy( Cycle = new DrivingCycleProxy(
DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, CycleType.EngineOnly, cycle.Name, false), cycle.Name), DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, cycle.Name, false), cycle.Name),
ExecutionMode = ExecutionMode.Engineering ExecutionMode = ExecutionMode.Engineering,
SimulationType = SimulationType.EngineOnly
}; };
yield return simulationRunData; yield return simulationRunData;
} }
......
...@@ -78,6 +78,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl ...@@ -78,6 +78,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
var drivingCycle = CyclesCache.ContainsKey(cycle.CycleData.Source) var drivingCycle = CyclesCache.ContainsKey(cycle.CycleData.Source)
? CyclesCache[cycle.CycleData.Source] ? CyclesCache[cycle.CycleData.Source]
: DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, cycle.Name, crossWindRequired); : DrivingCycleDataReader.ReadFromDataTable(cycle.CycleData, cycle.Name, crossWindRequired);
return new VectoRunData { return new VectoRunData {
JobName = InputDataProvider.JobInputData.JobName, JobName = InputDataProvider.JobInputData.JobName,
EngineData = engineData, EngineData = engineData,
...@@ -92,7 +93,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl ...@@ -92,7 +93,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
Retarder = dao.CreateRetarderData(InputDataProvider.JobInputData.Vehicle.RetarderInputData), Retarder = dao.CreateRetarderData(InputDataProvider.JobInputData.Vehicle.RetarderInputData),
PTO = ptoTransmissionData, PTO = ptoTransmissionData,
Cycle = new DrivingCycleProxy(drivingCycle, cycle.Name), Cycle = new DrivingCycleProxy(drivingCycle, cycle.Name),
ExecutionMode = ExecutionMode.Engineering ExecutionMode = ExecutionMode.Engineering,
SimulationType = SimulationType.DistanceCycle | SimulationType.MeasuredSpeedCycle | SimulationType.PWheel
}; };
}); });
} }
......
...@@ -122,7 +122,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl { ...@@ -122,7 +122,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl {
FanData = new AuxFanData() { FanData = new AuxFanData() {
FanCoefficients = InputDataProvider.JobInputData.FanPowerCoefficents.ToArray(), FanCoefficients = InputDataProvider.JobInputData.FanPowerCoefficents.ToArray(),
FanDiameter = InputDataProvider.JobInputData.FanDiameter, FanDiameter = InputDataProvider.JobInputData.FanDiameter,
} },
SimulationType = SimulationType.VerificationTest
}; };
}); });
} }
......
...@@ -37,6 +37,7 @@ using TUGraz.VectoCommon.Exceptions; ...@@ -37,6 +37,7 @@ using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils; using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration; using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.InputData.Reader.Impl;
using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Declaration;
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;
...@@ -105,6 +106,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data ...@@ -105,6 +106,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
public AuxFanData FanData { get; internal set; } public AuxFanData FanData { get; internal set; }
public SimulationType SimulationType { get; set; }
public class AuxData public class AuxData
{ {
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
......
{
"Header": {
"CreatedBy": "Michael Krisper, IVT, Graz University of Technology",
"Date": "2016-08-10T15:05:37.0945917Z",
"AppVersion": "2.2",
"FileVersion": 3
},
"Body": {
"SavedInDeclMode": false,
"VehicleFile": "<NOFILE>",
"EngineFile": "../Components/24t Coach.veng",
"GearboxFile": "<NOFILE>",
"Cycles": [
"../Cycles/Coach.vdri"
],
"AuxiliaryAssembly": "CLASSIC",
"AuxiliaryVersion": "CLASSIC",
"AdvancedAuxiliaryFilePath": "",
"VACC": "<NOFILE>",
"EngineOnlyMode": true,
"StartStop": {
"Enabled": false,
"MaxSpeed": 5.0,
"MinTime": 5.0,
"Delay": 0
},
"LAC": {
"Enabled": true,
"Dec": -0.5,
"MinSpeed": 50.0,
"PreviewDistanceFactor": 10.0,
"DF_offset": 2.5,
"DF_scaling": 1.5,
"DF_targetSpeedLookup": "",
"Df_velocityDropLookup": ""
},
"OverSpeedEcoRoll": {
"Mode": "Off",
"MinSpeed": 0.0,
"OverSpeed": 0.0,
"UnderSpeed": 0.0
}
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "Michael Krisper, IVT, Graz University of Technology",
"Date": "2016-08-10T15:05:37.0945917Z",
"AppVersion": "2.2",
"FileVersion": 3
},
"Body": {
"SavedInDeclMode": false,
"VehicleFile": "<NOFILE>",
"EngineFile": "../Components/24t Coach.veng",
"GearboxFile": "<NOFILE>",
"Cycles": [
"../Cycles/Coach time based short.vdri"
],
"AuxiliaryAssembly": "CLASSIC",
"AuxiliaryVersion": "CLASSIC",
"AdvancedAuxiliaryFilePath": "",
"VACC": "<NOFILE>",
"EngineOnlyMode": true,
"StartStop": {
"Enabled": false,
"MaxSpeed": 5.0,
"MinTime": 5.0,
"Delay": 0
},
"LAC": {
"Enabled": true,
"Dec": -0.5,
"MinSpeed": 50.0,
"PreviewDistanceFactor": 10.0,
"DF_offset": 2.5,
"DF_scaling": 1.5,
"DF_targetSpeedLookup": "",
"Df_velocityDropLookup": ""
},
"OverSpeedEcoRoll": {
"Mode": "Off",
"MinSpeed": 0.0,
"OverSpeed": 0.0,
"UnderSpeed": 0.0
}
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "",
"Date": "2017-11-20T13:22:33.6138904Z",
"AppVersion": "3",
"FileVersion": 4
},
"Body": {
"SavedInDeclMode": false,
"DeclarationVehicle": "Tractor_4x2_vehicle-class-5_Generic vehicle.xml",
"FanPowerCoefficients": [
5.5E-07,
15.0,
108.5
],
"FanDiameter": 0.225,
"Cycles": [
"..\\Cycles\\Coach.vdri"
]
}
}
\ No newline at end of file
...@@ -1790,6 +1790,15 @@ ...@@ -1790,6 +1790,15 @@
<None Include="TestData\Jobs\40t_Long_Haul_Truck_wrong_AUX.vecto"> <None Include="TestData\Jobs\40t_Long_Haul_Truck_wrong_AUX.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="TestData\Jobs\EngineOnlyJobWithMeasuredCycle.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Jobs\EngineOnlyJobWithDistanceCycle.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Jobs\VTPModeWithDistanceCycle.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Jobs\job-report.vecto"> <None Include="TestData\Jobs\job-report.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -2661,6 +2670,9 @@ ...@@ -2661,6 +2670,9 @@
<Content Include="TestData\Integration\VTPMode\GenericVehicle\Tractor_4x2_vehicle-class-5_Generic vehicle.xml"> <Content Include="TestData\Integration\VTPMode\GenericVehicle\Tractor_4x2_vehicle-class-5_Generic vehicle.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="TestData\Jobs\Tractor_4x2_vehicle-class-5_Generic vehicle.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\XML\XMLReaderDeclaration\vecto_engine-sample.xml" /> <Content Include="TestData\XML\XMLReaderDeclaration\vecto_engine-sample.xml" />
<Content Include="TestData\XML\XMLReaderDeclaration\vecto_gearbox-sample.xml" /> <Content Include="TestData\XML\XMLReaderDeclaration\vecto_gearbox-sample.xml" />
<Content Include="TestData\XML\XMLReaderDeclaration\vecto_vehicle-sample_noAirdrag.xml"> <Content Include="TestData\XML\XMLReaderDeclaration\vecto_vehicle-sample_noAirdrag.xml">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment