简体   繁体   中英

SUMO: Change simulation time step and output option

I am running SUMO for a large network for up to 4 days. I understand thta most traffic following models were developed in second but I kind of need to increase the timestep to minutes or 5/10 mins.

I have come across this function. https://sourceforge.net/p/sumo/mailman/message/32876223/

<time>
    <step-length value="3600" />
</time>

However, when I used it, it doesn't seem right. Yes, per step each vehicle does travel much further than it does with a smaller timestep. Th issue seems like only one or two cars can departure each time which overwrites the step-length function.

Can someone tell me how to set a different timestep and are there another setting I need to change to make it right?

Another question is I am getting a very large xml output file, however, I only care about the last timestep or certain timesteps. So I am wondering are there any possible way I can choose only to output last timestep or selected timesteps?

The step length is a value in seconds describing the length of one simulation step. You probably do not want this to be larger than a second or maybe two. Otherwise the vehicles simply cannot react, because the positions of all the others get only updated once an hour (if setting the value to 3600 as in your example). If you need aggregated data have a look at Sumo's meandata outputs . This is done with writing an additional file with the content

<additional>
    <laneData id="dump" freq="3600" file="aggregated.xml"/>
</additional>

If you want to filter the data on the fly you can write it to a socket using the special filename localhost:12345 where you will need some kind of server listening on port 12345 on your local machine and filtering the file. If you are in a Unix-like environment you can of course use named pipes . You can also write to stdout or stderr using the special filenames stdout or stderr and filter this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM