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

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

Merge pull request #841 in VECTO/vecto-sim from...

Merge pull request #841 in VECTO/vecto-sim from VECTO/mq_vecto-sim:bugfix/VECTO-1355-vtp-simulation-abort to develop

* commit 'a0d9e0b9':
  adding PTO columns to mod container in VTP simulation
  adding testcase Declaration VTP simulation run with PTO
parents 430f1da4 a0d9e0b9
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,14 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
aux.AddCycle(Constants.Auxiliaries.IDs.Fan, cycleEntry => engineFan.PowerDemand(cycleEntry.FanSpeed));
container.ModalData.AddAuxiliary(Constants.Auxiliaries.IDs.Fan);
if (data.PTO != null) {
container.ModalData.AddAuxiliary(Constants.Auxiliaries.IDs.PTOTransmission,
Constants.Auxiliaries.PowerPrefix + Constants.Auxiliaries.IDs.PTOTransmission);
container.ModalData.AddAuxiliary(Constants.Auxiliaries.IDs.PTOConsumer,
Constants.Auxiliaries.PowerPrefix + Constants.Auxiliaries.IDs.PTOConsumer);
}
engine.Connect(aux.Port());
var idleController = new CombustionEngine.CombustionEngineNoDubleclutchIdleController(engine, container);
......
......@@ -35,6 +35,7 @@ using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using NUnit.Framework;
using NUnit.Framework.Internal;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.FileIO.JSON;
......@@ -86,8 +87,10 @@ namespace TUGraz.VectoCore.Tests.Integration.VTP
[Category("LongRunning")]
[Category("Integration")]
[TestCase(@"TestData\Integration\VTPMode\GenericVehicle\class_5_generic vehicle_DECL.vecto")]
public void RunVTP_Declaration(string jobFile)
[TestCase(@"TestData\Integration\VTPMode\GenericVehicle\class_5_generic vehicle_DECL.vecto", 0.8972, TestName = "Generic Group 5 VTP Test Declaration Mode"),
TestCase(@"TestData\Integration\VTPMode\GenericVehicle XMLJob PTO\class_5_generic vehicle_DECL.vecto", 0.8972, TestName = "Generic Group 5 VTP Test Declaration Mode with PTO")
]
public void RunVTP_Declaration(string jobFile, double expectedVTPFactor)
{
var fileWriter = new FileOutputWriter(jobFile);
var sumWriter = new SummaryDataContainer(fileWriter);
......@@ -115,7 +118,7 @@ namespace TUGraz.VectoCore.Tests.Integration.VTP
var vtpReport = XDocument.Load(XmlReader.Create(fileWriter.XMLVTPReportName));
var vtpFactor = vtpReport.XPathSelectElement("//*[local-name() = 'Results']/*[local-name() = 'VTRatio']")?.Value.ToDouble(0);
Assert.AreEqual(0.8972, vtpFactor);
Assert.AreEqual(expectedVTPFactor, vtpFactor);
}
[Category("LongRunning")]
......@@ -152,6 +155,8 @@ namespace TUGraz.VectoCore.Tests.Integration.VTP
Assert.AreEqual(0.8972, vtpFactor);
}
[Category("LongRunning")]
[Category("Integration")]
[TestCase(@"TestData\Integration\VTPMode\GenericVehicle\VTP_AT-gbx.vecto")]
......
{
"Header": {
"CreatedBy": "",
"Date": "2018-05-02T11:40:41.8847449Z",
"AppVersion": "3",
"FileVersion": 4
},
"Body": {
"SavedInDeclMode": true,
"DeclarationVehicle": "Tractor_4x2_vehicle-class-5_Generic vehicle.xml",
"ManufacturerRecord": "Tractor_4x2_vehicle-class-5_Generic vehicle.RSLT_MANUFACTURER.xml",
"Mileage": 10000.0,
"NCVTestFuel": 41.0,
"FanPowerCoefficients": [
5.5E-07,
15.0,
108.5
],
"FanDiameter": 0.225,
"Cycles": [
"VTP_rural_2Hz.vdri"
]
}
}
\ No newline at end of file
......@@ -1859,6 +1859,12 @@
<None Include="TestData\Integration\TotalMassExceededInMU\Gear_9.vtlm">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\VTPMode\GenericVehicle XMLJob PTO\class_5_generic vehicle_DECL.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\VTPMode\GenericVehicle XMLJob PTO\VTP_rural_2Hz.vdri">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\VTPMode\GenericVehicle_CNG\class_5_generic vehicle_DECL.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......@@ -2901,6 +2907,12 @@
<Content Include="TestData\Integration\DeclarationMode\ExemptedVehicle\vecto_vehicle-sample_exempted.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\Integration\VTPMode\GenericVehicle XMLJob PTO\Tractor_4x2_vehicle-class-5_Generic vehicle.RSLT_MANUFACTURER.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\Integration\VTPMode\GenericVehicle XMLJob PTO\Tractor_4x2_vehicle-class-5_Generic vehicle.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\Integration\VTPMode\GenericVehicle_CNG\Tractor_4x2_vehicle-class-5_Generic vehicle.RSLT_MANUFACTURER.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
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