AnyLogic:如何设置超出范围的行人舒适速度

时间:2018-03-22 19:20:05

标签: anylogic

我遇到了行人图书馆的问题。我想使用行人图书馆来模拟车辆的行为,因此,我想设定代理的舒适速度,比如70km / h。但是,有一个错误说速度必须在[0mps,10mps]之内​​。有没有办法设定我想要的速度?

谢谢,

建南

1 个答案:

答案 0 :(得分:0)

First why don't you use the road traffic library? But you must have your reasons.

You can't change the maximum speed value, but what you can do, which is not a very elegant solution, but a solution nonetheless, is to change the time scale of your model. There is no direct option for that, so you basically have to create your own clock that runs your way.

So for instance, if you want your car to move at 20mps, you choose 10 mps as the comfortable speed and you have the transformation customTime(time())=0.5*time(), where custom time is your own function.

So every time 1 second passes in the simulation, in your custom clock only 0.5 seconds will pass... You just have to take care of the statistics you are collecting so they fit your time scale. Also, you will have to change everything according to your clock in your model, because Anylogic will continue showing you things in normal seconds.

Hope that helps :)