简体   繁体   English

SUMO:更改模拟时间步长和输出选项

[英]SUMO: Change simulation time step and output option

I am running SUMO for a large network for up to 4 days.我正在为大型网络运行 SUMO 长达 4 天。 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.我知道大多数流量跟随模型是在第二次开发的,但我需要将时间步长增加到几分钟或 5/10 分钟。

I have come across this function.我遇到过这个功能。 https://sourceforge.net/p/sumo/mailman/message/32876223/ 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.这个问题似乎每次只有一两辆车可以出发,这会覆盖step-length函数。

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.另一个问题是我得到了一个非常大的xml输出文件,但是,我只关心最后一个时间步或某些时间步。 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).否则车辆根本无法做出反应,因为所有其他车辆的位置每小时仅更新一次(如果将值设置为 3600,如您的示例)。 If you need aggregated data have a look at Sumo's meandata outputs .如果您需要聚合数据,请查看Sumo 的 meandata 输出 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.如果您想即时过滤数据,您可以使用特殊文件名localhost:12345将其写入套接字,您将需要某种服务器侦听本地计算机上的端口 12345 并过滤文件。 If you are in a Unix-like environment you can of course use named pipes .如果您在类 Unix 环境中,您当然可以使用命名管道 You can also write to stdout or stderr using the special filenames stdout or stderr and filter this.您还可以使用特殊文件名stdoutstderr写入stdoutstderr并对其进行过滤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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