sumo icon indicating copy to clipboard operation
sumo copied to clipboard

Sim with load state does not produce the same edge data output

Open gladysmcgan opened this issue 6 months ago • 2 comments

Hi, I am getting different results for a run with load state and a run without.

  1. Simulation, saving simulation state at interval 55800. sumo-gui -c test.sumocfg --save-state.rng --save-state.times 55800

  2. Simulation, loading simulation state from above, starting at 55800. sumo-gui -c test_load_state.sumocfg

Comparing from interval 55800, the edge data from the two simulations gave slightly different outputs, though I would expect them to be the same. I'm looking at the edge data of one edge (-695666936)

Image

sim files are here: issue_test_save_state.zip

Would be grateful for your help!

gladysmcgan avatar Jun 04 '25 14:06 gladysmcgan

identified causes so far:

  • #16770
  • #16772
  • #16775
  • #16784
  • #16870
  • #16871
  • #16874
  • #16876
  • #16894

namdre avatar Jun 05 '25 08:06 namdre

there seem to be at least three more issues

  • one related to --meso-overtaking
  • one related to --weights.random-factor
  • one more

namdre avatar Jun 11 '25 06:06 namdre

Thank you for the fixes so far! Is there any configuration we could try now that can reproduce save states?

gladysmcgan avatar Jun 18 '25 07:06 gladysmcgan

No. I haven't figured out all of the remaining issues and thus cannot recommend a workaround yet.

namdre avatar Jun 18 '25 07:06 namdre

Thank you for the fixes so far! Is there any configuration we could try now that can reproduce save states?

Todays nightly build should reproduce from saved state when running without option --weights.random-factor.

namdre avatar Jul 09 '25 07:07 namdre

after adfc9dcb573c1f91fbafd0d64a1c7da3c7f75ada, your simulation replicates from loaded state.

namdre avatar Jul 14 '25 05:07 namdre

Thanks for the fixes! I tried the above test case with its configs, also without weights.random-factor, but unfortunately I'm still getting some differences in the edge data output.. I used Version v1_23_1+1041-39398899bf9.

Image Though they start to show the same output at the last few intervals in the simulation Image

gladysmcgan avatar Jul 14 '25 09:07 gladysmcgan

My mistake. I only checked for matching fcd-output and only when running with --precision 4 --save-state.precision 4

namdre avatar Jul 14 '25 12:07 namdre

after 36b635133b41d20b861daae0dd01b5a0d3f0a5f4, edgeData output should replicate when running with option --save-state.precision 4

namdre avatar Jul 15 '25 13:07 namdre

I'm sorry to write again! It still doesn't show exactly the same outputs for me, here are the 2 edge data files: outputs.zip

At 86400 there is a difference for edge -695666936

I'm using Version v1_23_1+1106-b5eb7f5af4b

gladysmcgan avatar Jul 16 '25 11:07 gladysmcgan

  • in my tests I was using routing-algorithm dijkstra, please check whether this makes a difference for you
  • i can confirm that results diverge when using astar instead if dijkstra
  • unfortunately, my astar results also differ from your astar results. Please attach your dijkstra edgeData-outputs so I can compare them with mine.

namdre avatar Jul 17 '25 06:07 namdre

Running with dijkstra still give different outputs for me: outputs_dijkstra.zip

We tried with 2 recent versions, and they both produce the same results v1_23_1+1106-b5eb7f5af4b v1_23_1+1110-3ee544734de

gladysmcgan avatar Jul 17 '25 08:07 gladysmcgan

after 36b6351, edgeData output should replicate when running with option --save-state.precision 4

If I may add to the conversation here, I tried:
sumoD -c sumo_base.sumocfg -b 0 -e 10800 --save-state.period 900 --save-state.rng --precision 4 --save-state.precision 4 --save-state.prefix base

and then
sumoD -c sumo_base.sumocfg -b 8100 -e 10800 --load-state base_8100.00.xml.gz --precision 4

but I also get many considerable differences.

In my sumocfg I am using:

<processing>
    <random-depart-offset value="0" />
    <no-internal-links value="true" />
    <ignore-junction-blocker value="1" />
    <ignore-route-errors value="true" />
    <time-to-impatience value="7" />
    <scale value="1" />
    <time-to-teleport.disconnected value="1" />
    <time-to-teleport value="160" />
</processing>

<routing>
    <routing-algorithm value="dijkstra" />
    <weights.random-factor value="1" />
    <weights.priority-factor value="2" />
    <device.rerouting.probability value="1.0" />
    <device.rerouting.period value="60" />
    <device.rerouting.pre-period value="0" />
    <device.rerouting.adaptation-steps value="2" />
    <device.rerouting.adaptation-interval value="20" />
    <device.rerouting.with-taz value="false" />
    <device.rerouting.threads value="4" />
    <device.rerouting.synchronize value="true" />
</routing>

sumo version v1_24_0+0131-1c1d11924c6

aminissn avatar Aug 07 '25 14:08 aminissn