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 6d6f176d authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Pull request #148: Bugfix/VECTO-1525 pcc preprocessing

Merge in VECTO/vecto-dev from VECTO/mq_vecto-dev:bugfix/VECTO-1525-pcc-preprocessing to develop

* commit '792138f1':
  pcc segment preprocessor: update targetspeed also in case of non-highway sections to avoid that pcc sections reach into parts without highway
  adding testcase for pcc segment preprocessing where a pcc segment starts shortly after standstill
parents ad420a36 792138f1
Branches
Tags
No related merge requests found
......@@ -62,6 +62,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
// pcc is only applicable on highway sections
if (!start.Highway) {
pccSegment = null;
targetSpeedChanged = end.Distance;
continue;
}
......
......@@ -8,6 +8,7 @@ using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.FileIO.JSON;
using TUGraz.VectoCore.InputData.FileIO.XML;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl;
using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
......@@ -117,6 +118,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
[TestCase(Class9Decl, ExecutionMode.Declaration, 0),
TestCase(@"TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG.vecto", ExecutionMode.Engineering, 0),
TestCase(@"TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG.vecto", ExecutionMode.Engineering, 1),
TestCase(@"TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG.vecto", ExecutionMode.Engineering, 12),
]
public void TestSimulationPreprocessingPccSegments(string jobFile, ExecutionMode mode, int i)
{
......@@ -166,6 +168,32 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
}
[
TestCase(@"TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_ENG.vecto", ExecutionMode.Engineering, 12),
]
public void TestSimulationPreprocessingPccSegmentsVehicleStop(string jobFile, ExecutionMode mode, int i)
{
var fileWriter = new FileOutputWriter(jobFile);
var sumWriter = new SummaryDataContainer(fileWriter);
var jobContainer = new JobContainer(sumWriter);
var dataProvider = JSONInputDataFactory.ReadJsonJob(jobFile);
var runsFactory = new SimulatorFactory(mode, dataProvider, fileWriter) {
ModalResults1Hz = false,
WriteModalResults = true,
ActualModalData = false,
Validate = false,
};
jobContainer.AddRuns(runsFactory);
//foreach (var i in new[] { 0, 1, 4, 5 }) {
var segments = SimulationRunPreprocessingPCCSegments(jobContainer.Runs[i].Run);
var segment = segments.Segments[19];
Console.WriteLine($"{segment.StartDistance} {segment.EndDistance}");
Assert.IsTrue(segment.StartDistance.IsGreater(66695));
}
protected virtual Dictionary<MeterPerSecond, Radian> SimulationRunPreprocessingEcoRoll(IVectoRun run)
......
......@@ -47,7 +47,8 @@
"Group5Eng_CaseG.vdri",
"Group5Eng_CaseH.vdri",
"Group5Eng_CaseI.vdri",
"Group5Eng_CaseJ.vdri"
"Group5Eng_CaseJ.vdri",
"Coach_short_HW.vdri"
]
}
}
\ No newline at end of file
......@@ -3280,6 +3280,9 @@
<None Include="TestData\Integration\ADAS\Group5PCCEng\Class5_Tractor_PCC123EcoSS.vveh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\ADAS\Group5PCCEng\Coach_short_HW.vdri">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\ADAS\Group5PCCEng\CrestCoast1.vdri">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment