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

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

pcc segment preprocessor: skip potential pcc segment if target speed changes,...

pcc segment preprocessor: skip potential pcc segment if target speed changes, not highway part, or target speed is below pcc-enable speed
parent 6ef51060
No related branches found
No related tags found
No related merge requests found
......@@ -43,11 +43,13 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl {
var targetspeedChanged = 0.SI<Meter>();
foreach (var tuple in Container.RunData.Cycle.Entries.Pairwise(Tuple.Create)) {
if (!tuple.Item1.Highway) {
pccSegment = null;
continue;
}
if (!tuple.Item1.VehicleTargetSpeed.IsGreaterOrEqual(PCCDriverData.PCCEnableSpeed)) {
// only consider pcc segments where the target speed is at least the pcc-enable speed
pccSegment = null;
continue;
}
if (tuple.Item1.Distance.IsEqual(tuple.Item2.Distance)) {
......@@ -58,6 +60,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl {
if (!tuple.Item1.VehicleTargetSpeed.IsEqual(tuple.Item2.VehicleTargetSpeed)) {
// target speed must not change within PCC segment
targetspeedChanged = tuple.Item2.Distance;
pccSegment = null;
continue;
}
......
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