Skip to content

meso: update interpolated positions in every step - #18397

Open
aminissn wants to merge 1 commit into
eclipse-sumo:mainfrom
aminissn:fix-meso-interpolate-pos-query-rate
Open

aminissn wants to merge 1 commit into
eclipse-sumo:mainfrom
aminissn:fix-meso-interpolate-pos-query-rate

Conversation

@aminissn

Copy link
Copy Markdown
Contributor

The positions of all occupied edges are now updated once per step before the outputs are written. The edge lock is taken since the gui draws from the same cache. Plain meso without --meso-interpolate-pos is not affected.
What I didn't check was its impact on simulation speed.

With --meso-interpolate-pos, MSEdge::getMesoPositions does not let a vehicle
move backwards, so a new position depends on the previously cached one. The
cache was only updated when positions were queried. fcd-output queries every
step while queue-output only queries queued vehicles, so the same scenario
produced different queue lengths (and occasionally arrivals, since
MEVehicle::hasArrived uses the position) depending on which other outputs
were active.

The positions of all occupied edges are now updated once per step before the
outputs are written. The edge lock is taken since the gui draws from the same
cache. Plain meso without --meso-interpolate-pos is not affected.

Found while comparing micro and meso queue-output for eclipse-sumo#18388.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant