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

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

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

* commit '6610aa2e':
  adding a testcase for simulation-run specific fc correction factor
parents 1f5473b2 6610aa2e
Branches EDELIVERY-12010-smp-automation-related-improvements
No related tags found
No related merge requests found
......@@ -84,5 +84,22 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
var runs = factory.SimulationRuns().ToArray();
Assert.AreEqual(8, runs.Length);
}
[TestCase()]
public void TestEngineCorrectionFactor()
{
var inputDataProvider = new XMLDeclarationInputDataProvider(XmlReader.Create(SampleVehicleDecl), true);
var factory = new SimulatorFactory(ExecutionMode.Declaration, inputDataProvider, null) { Validate = false };
var runs = factory.SimulationRuns().ToArray();
var expected = new[] { 1.018867, 1.018867, 1.018867, 1.018867, 1.013299, 1.013299, 1.013299, 1.013299 };
for (var i = 0; i < 8; i++)
Assert.AreEqual(
expected[i], runs[i].GetContainer().RunData.EngineData.FuelConsumptionCorrectionFactor, 1e-6,
"correction factor for cycle {0} payload {1} mismatch ({2})", runs[i].CycleName , runs[i].RunSuffix, i);
}
}
}
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