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 cf891c22 authored by Michael KRISPER's avatar Michael KRISPER Committed by Markus Quaritsch
Browse files

Pull request #142: Develop

Merge in VECTO/vecto-dev from VECTO/mk_vecto-dev:develop to develop

* commit 'f35b5742':
  renamed testcase
  VECTO-1493 Testcase for P1+PCC+ESS (comparison on and off) TestP1ESS_ICEOnICEOff
parents a7e330af f35b5742
Branches
Tags
No related merge requests found
...@@ -154,6 +154,44 @@ namespace TUGraz.VectoCore.Tests.Reports ...@@ -154,6 +154,44 @@ namespace TUGraz.VectoCore.Tests.Reports
RunSimulation(jobName, ExecutionMode.Engineering); RunSimulation(jobName, ExecutionMode.Engineering);
} }
[Category("LongRunning")]
[TestCase]
public void Test_P1_PCC_ESSOn_EssOff()
{
var jobName = @"TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_s2c0_rep_Payload.vecto";
var fileWriter = new FileOutputWriter(jobName);
var sumData = new SummaryDataContainer(fileWriter);
var jobContainer = new JobContainer(sumData);
var inputData = JSONInputDataFactory.ReadJsonJob(jobName);
var runsFactory = new SimulatorFactory(ExecutionMode.Engineering, inputData, fileWriter) { WriteModalResults = false, Validate = false };
jobContainer.AddRuns(runsFactory);
var run = runsFactory.SimulationRuns().First();
var modESSon = (run.GetContainer().ModalData as ModalDataContainer).Data;
run.Run();
Assert.IsTrue(run.FinishedWithoutErrors);
jobName = @"TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_s2c0_rep_Payload_ESSoff.vecto";
fileWriter = new FileOutputWriter(jobName);
inputData = JSONInputDataFactory.ReadJsonJob(jobName);
runsFactory = new SimulatorFactory(ExecutionMode.Engineering, inputData, fileWriter) { WriteModalResults = false, Validate = false };
jobContainer.AddRuns(runsFactory);
run = runsFactory.SimulationRuns().First();
var modESSoff = (run.GetContainer().ModalData as ModalDataContainer).Data;
run.Run();
Assert.IsTrue(run.FinishedWithoutErrors);
// ICEOn is sometimes 0, therefore the sum must be lower than the row count
Assert.That(modESSon.Sum(r => (bool)r[ModalResultField.ICEOn.GetName()] ? 1 : 0) < modESSon.Rows.Count);
// ICEOn must always be 1, therefore the sum should equal the row count
Assert.That(modESSoff.Sum(r => (bool)r[ModalResultField.ICEOn.GetName()] ? 1 : 0) == modESSoff.Rows.Count);
}
[TestCase(@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto")] [TestCase(@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto")]
public void TestVSUM_VMOD_FormatDecl(string jobName) public void TestVSUM_VMOD_FormatDecl(string jobName)
......
{
"Header": {
"CreatedBy": "",
"Date": "2021-12-21T10:13:15.9000372Z",
"AppVersion": "3",
"FileVersion": 10
},
"Body": {
"SavedInDeclMode": false,
"VehCat": "Tractor",
"LegislativeClass": "Unknown",
"CurbWeight": 7747.0,
"CurbWeightExtra": 7500.0,
"MassMax": 18.0,
"Loading": 19300.0,
"rdyn": 492.0,
"CdCorrMode": "CdofVdecl",
"CdCorrFile": "",
"AxleConfig": {
"Type": "4x2",
"Axles": [
{
"Inertia": 14.9,
"Wheels": "315/70 R22.5",
"AxleWeightShare": 0.2,
"TwinTyres": false,
"RRCISO": 0.0052,
"FzISO": 33350.0,
"Type": "VehicleNonDriven"
},
{
"Inertia": 14.9,
"Wheels": "315/70 R22.5",
"AxleWeightShare": 0.25,
"TwinTyres": true,
"RRCISO": 0.0057,
"FzISO": 33350.0,
"Type": "VehicleDriven"
},
{
"Inertia": 19.2,
"Wheels": "385/65 R22.5",
"AxleWeightShare": 0.18333,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 41690.0,
"Type": "Trailer"
},
{
"Inertia": 19.2,
"Wheels": "385/65 R22.5",
"AxleWeightShare": 0.18333,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 41690.0,
"Type": "Trailer"
},
{
"Inertia": 19.2,
"Wheels": "385/65 R22.5",
"AxleWeightShare": 0.18334,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 41690.0,
"Type": "Trailer"
}
]
},
"EngineStopStart": false,
"EcoRoll": "None",
"PredictiveCruiseControl": "Option_1_2_3",
"ATEcoRollReleaseLockupClutch": false,
"CdA": 5.62,
"VehicleHeight": 4.0,
"IdlingSpeed": 550.0,
"Retarder": {
"Type": "secondary",
"Ratio": 1.0,
"File": "Default.vrlm"
},
"Angledrive": {
"Type": "None",
"Ratio": 0.0,
"LossMap": ""
},
"PTO": {
"Type": "None",
"LossMap": "",
"Cycle": "",
"CycleDriving": ""
},
"TorqueLimits": {},
"InitialSoC": 50.0,
"PowertrainConfiguration": "ParallelHybrid",
"ElectricMotors": [
{
"Count": 1,
"Ratio": 1.0,
"Position": "P1",
"MotorFile": "P1_Group5_EM.vem",
"MechanicalEfficiency": 1.0
}
],
"Batteries": [
{
"NumPacks": 1,
"BatteryFile": "P1_Group5_REESS.vreess",
"StreamId": 0
}
]
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "",
"Date": "2021-12-21T10:13:17.1134933Z",
"AppVersion": "3",
"FileVersion": 8
},
"Body": {
"SavedInDeclMode": false,
"EngineOnlyMode": false,
"VehicleFile": "P1_Group5_ESSoff.vveh",
"EngineFile": "P1_Group5_12.7l.veng",
"GearboxFile": "AMT_12.vgbx",
"TCU": "AMT_12.vgbx",
"HybridStrategyParams": "HEV_Parameter.vhctl",
"Padd": 4293.0,
"Paux_ICEOff_Driving": 0.0,
"Paux_ICEOff_Standstill": 0.0,
"Padd_electric": 0.0,
"VACC": "Truck.vacc",
"EngineStopStartAtVehicleStopThreshold": 2.0,
"EngineStopStartMaxOffTimespan": 120.0,
"EngineStopStartUtilityFactor": 0.8,
"EngineStopStartUtilityFactorDriving": 0.8,
"EcoRollMinSpeed": 0.0,
"EcoRollActivationDelay": 0.0,
"EcoRollUnderspeedThreshold": 0.0,
"EcoRollMaxAcceleration": 0.0,
"PCCEnableSpeed": 80.0,
"PCCMinSpeed": 50.0,
"PCCUnderspeed": 8.0,
"PCCOverSpeed": 5.0,
"PCCPreviewDistanceUC1": 1500.0,
"PCCPreviewDistanceUC2": 1000.0,
"LAC": {
"Enabled": true,
"PreviewDistanceFactor": 10.0,
"DF_offset": 2.5,
"DF_scaling": 1.5,
"DF_targetSpeedLookup": "",
"Df_velocityDropLookup": "",
"MinSpeed": 50.0
},
"OverSpeedEcoRoll": {
"Mode": "Overspeed",
"MinSpeed": 50.0,
"OverSpeed": 2.5
},
"Cycles": [
"LongHaul_mod5_id_2.vdri"
]
}
}
\ No newline at end of file
...@@ -3586,12 +3586,18 @@ ...@@ -3586,12 +3586,18 @@
<None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_EM.vem"> <None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_EM.vem">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_ESSoff.vveh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_REESS.vreess"> <None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_REESS.vreess">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_s2c0_rep_Payload.vecto"> <None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_s2c0_rep_Payload.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\P1_Group5_s2c0_rep_Payload_ESSoff.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\REESS_Internal_Resistance.vbatr"> <None Include="TestData\Integration\EngineeringMode\P1_Group5_AMT\REESS_Internal_Resistance.vbatr">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment