fix: correct participant simulation timing and queue key fallbacks
- Align signal phase evaluation with the Cesium simulation clock so speed control multipliers keep vehicles and traffic lights in sync - Clamp long frame gaps instead of freezing all participants; short steps keep IDM deceleration clamps effective near stop lines - Fall back to approachRoadId for lane grouping when movement.fromLaneId is missing, preventing side-by-side vehicle overlap on shared lanes - Guard against a missing toggleVehicles DOM element inside the tick loop - Use template.id as the pedestrian queue key for consistent Map lookups - Report participant_route_too_short diagnostics instead of silently dropping pedestrian and bicycle templates shorter than 5 m
This commit is contained in:
1 parent
7ce412e52e
commit
f4a4d48e3f
2 files changed
+23
-11
No files matched your search
@@ -339,7 +339,18 @@ function buildParticipants({ compiled, connectorCollection, laneCenterlines, sto
|
||||
}
|
||||
}
|
||||
|
||||
const withFleet = participants.filter((participant) => participant.fleet > 0 && participant.lengthMeters > 5);
|
||||
const withFleet = participants.filter((participant) => {
|
||||
if (participant.fleet <= 0) return false;
|
||||
if (participant.lengthMeters > 5) return true;
|
||||
diagnostics.push({
|
||||
severity: "warning",
|
||||
reason: "participant_route_too_short",
|
||||
message: `${participant.id} route is ${round(participant.lengthMeters)} m; participants need > 5 m to schedule.`,
|
||||
participantId: participant.id,
|
||||
routeLengthMeters: participant.lengthMeters,
|
||||
});
|
||||
return false;
|
||||
});
|
||||
return { participants: withFleet, diagnostics };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user