NetLogo: 1 tick = how many seconds?

倾然丶 夕夏残阳落幕 提交于 2019-11-26 21:50:50

问题


How many ticks in a NetLogo simulation (at normal speed) are equal to 1 'real world' second?


回答1:


Ticks are a unit of arbitrary time measurement inside the simulator, like most simulation engines ticks don't map directly to real world time - it's up to the person writing the simulation to decide how a tick maps to real world time.

As for the "normal speed" setting that NetLogo has, what that means is (and this is from experience, not from knowledge of how the engine actually works) that each time a tick is processed NetLogo will wait until the graphical display is updated before starting on the next run.

If you slow down the simulation (move that slider to the left) then NetLogo waits additional time before each simulation step, if you speed it up (move the slider to the right) then NetLogo will continue simulating while the graphical display updates, meaning you probably won't see every simulation step visualised.




回答2:


In my opinion conversion from ticks to second depends on the context.

An example: imagine that every patch in Netlogo is 40cm of real world, imagine that a human walks in a new patch in each tick. The average human speed while walking is estimated as 1.2 m/s, so every 3 ticks a human is performing 1.2m. We can finally state that 3 ticks in the simulated environment correspond to 1 second of life of the agents.

Changing the dimensions of patches or agents this proportions changes and so the meaning of the tick.

A single tick is not meant to have a fixed corrispondence with seconds, but it just means "a unit of time".




回答3:


From my experience with NetLogo, I don't think the ticks DO map to real world time. I believe they are unitless. Did you read something to the contrary?




回答4:


If you really want to measure using seconds instead of ticks, you can use the every keyword. This isn't suggested because it will be out of sync with the speed of the ticks per second. You won't be able to adjust the tick speed of the slider and have that propagate to everything. But it's there.

More information on the mailing list: http://netlogo-users.18673.x6.nabble.com/Running-command-every-x-iterations-td4864424.html




回答5:


It is possible though to calculate the time to run a specific piece of code in Netlogo(in real world time). Refer: Time for a procedure to run in NetLogo

1.)using reset-timer and timer

2.)profiler extension in NetLogo




回答6:


IF you want to make one tick represent a specific amount of time (one minute, one day, 2.73 years...) use the TIME extension: https://github.com/colinsheppard/time



来源:https://stackoverflow.com/questions/3571485/netlogo-1-tick-how-many-seconds

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!