sumo icon indicating copy to clipboard operation
sumo copied to clipboard

The "Save SUMOConfig" option doesn't include the network file

Open angelobanse opened this issue 3 years ago • 5 comments

angelobanse avatar Sep 13 '22 09:09 angelobanse

@angelobanse it works for me when I load a network via command line and also when I open a network from the menu.

Can you give detailed steps for reproducing?

namdre avatar Sep 13 '22 11:09 namdre

I was trying to save/create a config file - and not opening an existing one. Loading an existing config file works as expected.

My workflow:

  1. Creating a network
  2. Using demand mode to define trips
  3. Saving the network file
  4. Saving the demand file
  5. Attempting to generate a SUMO Config file using File>SUMOConfig>Save SUMOConfig As...

The saved SUMO Config file not only does not contain the network file, but uses route-files instead of value as a key:

<configuration>
    <net-file value=""/>
    <route-files route-files="foobar.rou.xml"/>
</configuration>

angelobanse avatar Sep 13 '22 13:09 angelobanse

Furthermore this configuration does not use the "section style" so it won't validate against the schema

behrisch avatar Sep 14 '22 15:09 behrisch

though the config files are never validated except in our schemacheck tests, right?

namdre avatar Sep 14 '22 17:09 namdre

right, the SUMO apps do not do this but it helps people who have XML editors with schema support to avoid typos.

behrisch avatar Sep 15 '22 06:09 behrisch

It still uses route-files instead of value here and has no sections or a schema. Can't we use the standard config writer?

behrisch avatar Sep 28 '22 08:09 behrisch

If we can manage to create a new OptionsCont without clobbering our current Singleton instance, then yes. Though frankly, I like the didactic value of exhibiting a clean sumocfg without the sections (which are overkill when you only have 4 options).

namdre avatar Sep 28 '22 10:09 namdre

understood. I am also not sure whether it is worth the effort.

behrisch avatar Sep 28 '22 15:09 behrisch