Thanks for clarifying things, Jakob.

First things first: I considered the settings in sumocfg-file as added to those that were 
supplied via command line arguments. Indeed, this seems to apply partially. I have 
<duration-log-statistics value="true"/> in the sumocfg file. When I omit this, 
then a short stats.xml is generated (upon command-line invocation with the -c argument).
When I do "reload" in the GUI, then the command line parameters are still 
active. And according to my understanding, reload starts parsing the sumocfg again.

Regarding handling/workflow:
I usually start sumo-gui from the desktop, and then load the config file via 
the file menu - just to 'mimic' the typical windows user would do it the same 
way. I only use the shell when I - sometimes - want to activate some other 
behaviour (e.g. bypass default teleporting).
Because of the precise behaviour you outlined now, I have decided to tell the linux 
system that upon clicking on a sumocfg-file, this file shall be opened with 
sumo-gui. Even more windows-like & appropriate, but also more convenient if I 
simply click on a sumocfg-file that implies other behaviour or one that is 
decicated to graphic edgedata evaluation.

For the sake of completeness: moving the --statistic-output <file> to the sumocfg 
indeed enables statistics output when invoked from the desktop. But it results in a 
stats.xml with absolute paths in the <input> section (all additional files etc.). 
Also when I click the sumocfg in the file manager (in the working directory, and all paths 
in sumocfg are relative - version 1.12.0+1429).

BTW: I'd suggest to output stats content also as a simple small table after 
simulation end - e.g. as an extension of the dialog box that pops up at the end 
of the simulation.

Regards,
Rob


Am 17.03.2022, 13:57 Uhr, schrieb Jakob Erdmann <[email protected]>:

I did not realize you were opening config files in sumo-gui.
This is the expected sequence of events when you load a new .sumocfg from 
within sumo-gui:
- the simulation that was started from the command line is aborted and any 
opened files are flushed and closed
- a new simulation is loaded that only uses the options defined in the loaded 
.sumocfg (prior command line options are not applied!)

All options that work from the command line also work in a .sumocfg so you couldinclude the 
line <statistic-output value="output/stats.xml">  to get your output when 
loading a config in the gui.

regards,
Jakob





Am Mi., 16. März 2022 um 17:44 Uhr schrieb Rob Maris <[email protected]>:
(please forward a few lines below for my remarks)

Am 14.03.2022, 10:18 Uhr, schrieb Jakob Erdmann <[email protected]>:

Therefore I point out mor clearly that without using the -c command line option, no 
summary is generated. At the moment I cannot >>>say whether this condition also 
applies to statistics output, since I did the tests on my office computer.

I'm pretty sure that this is working in our test. Please post the exact command 
that doesn't behave as expected.

$ sumo-gui --statistic-output "output/stats.xml" --summary output/summary.xml &
With this command, only edgedata.xml is generated (right from the start, just after 
having loaded the sumocfg file from the file >>menu. Note that edgedata.xml is 
specified via an include of an additional-misc.xml file with following contents:
<additional>
<edgeData id="full" file="output/edgedata.xml"/>
</additional>

Of course, edgedata.xml is also generated when sumo-gui is not started from the 
command line.

The report-section of the sumocfg file contains this:
<verbose value="true"/>
<duration-log.statistics value="true"/>
<no-step-log value="true"/>

Therefore I'd expect that a statistics output is generated. But I think that a 
missing statistic-output argument makes that this is >>not the case. Therefore 
I was using the commandline interface, hence the --statistic-output in the quoted 
command line above.

When I invoke this...
$ sumo-gui -c osm.sumocfg --statistic-output "output/stats.xml" --summary 
output/summary.xml &
... both stats.xml as well as summary.xml are created right after the start 
(initially only containing the header).

Hence, indeed the statistics output is generated only when specifying the 
osmcfg file via the command line.
Tested with 1.12.0 and also with 1.12.0+1158.
At any case: only when a file is present with header content after loading the simulation, 
the file will grow (summary) during or >>show content (edgedata, stats) after a 
simulation ends: there will by no output file when it it not present from the start. This 
>>allows very quick determination of behaviour without actually starting the 
simulation.

Regards,
Rob





Regarding buildup of summary data in memory
Summary output size grows linear with simulation duration and would therefore function as a "memory 
leak" in long-running >>>simulations if not flushed to disk. In contrast, statistic-output 
uses a fixed amount of memory since it only accumulates in a >>>constant number of variables.

Am Mo., 14. März 2022 um 09:51 Uhr schrieb Rob Maris <[email protected]>:
Jakob,

perhaps I was a bit misunderstanding. Therefore I point out mor clearly that without using the -c 
command line option, no summary >>>>is generated. At the moment I cannot say whether this 
condition also applies to statistics output, since I did the tests on my >>>>office 
computer.

Regarding buildup of summary data in memory (array) or disk: Well, let me compare with statistics output. This is something that 
>>>>IS build up into memory and is flushed into the file at the very moment of closing the final simulation end 
dialog with >>>>"yes" (closing view & files). Whether it's only flushing the file output buffer or 
outputting a data structure at that time is >>>>secondary.

Regards,
Rob


Am 14.03.2022, 08:53 Uhr, schrieb Jakob Erdmann <[email protected]>:

I'd suggest to add this condition to get it working also in 
https://sumo.dlr.de/docs/Simulation/Output/StatisticOutput.html, >>>>>preferably accompanied 
with a reference to https://sumo.dlr.de/docs/Simulation/Output/index.html#converting_outputs or to 
>>>>>https://sumo.dlr.de/docs/Tools/Xml.html#xml2csvpy.

The documentation already says "The elements vehicleTripStatistics, pedestrianStatistics, 
rideStatistics and transportStatistics >>>>>are only generated when either of the options 
--duration-log.statistics or --tripinfo-output are set."

I've now put this into a yellow box to make it more visible.
Note: the reason why this isn't on by default is because the additional bookkeeping required 
by this feature can slow down the >>>>>simulation.

I'd suggest to accumulate the summary in memory and output it at once to file, 
because this wouldn't slow down simulation.

I'm not sure I understood the suggestion. Do you propose that accumulating in memory would 
bring a speedup or that it would >>>>>bring some other benefit (without slowing 
down the simulation)?

best regards,
Jakob

Am Mi., 9. März 2022 um 15:04 Uhr schrieb Rob Maris <[email protected]>:
Approx. a month ago I started sumo sometimes with --statistic-output <FILE>.

Now, as I'm going to use this feature again, that means starting sumo-gui from the commandline, I 
did not get it working, >>>>>>which resulted in some frustration...
After inspecting old invocations from .bash_history, I saw that I also used the -c option. Then 
it works. Despite the fact >>>>>>that duration-log.statistics is defined in the 
xxx.sumocfg file.

I'd suggest to add this condition to get it working also in 
https://sumo.dlr.de/docs/Simulation/Output/StatisticOutput.html, >>>>>>preferably accompanied 
with a reference to https://sumo.dlr.de/docs/Simulation/Output/index.html#converting_outputs or to 
>>>>>>https://sumo.dlr.de/docs/Tools/Xml.html#xml2csvpy.

Regarding the summary output: I see that the file is growing during simulation. And that the file is accessible after 
>>>>>>Simulation end when the dialog box "Simulation ended" is responded to with 
"No" to close files & views.
I'd suggest to accumulate the summary in memory and output it at once to file, 
becaus this wouldn't slow down simulation.

Regards,
Rob
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user



--
Dem Ingeniör ist nichts zu schwör (außer bei Force Majör)
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to