English 中文(简体)
NetLogo: 1 tick = how many seconds?
原标题:
  • 时间:2010-08-26 01:40:46
  •  标签:
  • netlogo

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

最佳回答

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.

问题回答

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".

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?

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





相关问题
netlogo runtime error turtles on

while running the following code if any? (turtles-on patch-ahead q) [ some commands ] where q is a number variable there is a run time error saying: turtles-on expected the input to be agent or ...

netlogo programing help on traffic simulation

I am trying to find if there is a turtle on patch-ahead n whose speed - acceleration is <= 0. The code I came up with is: if any? turtles on patch-ahead n with [speed <= (speed - acceleration)]...

NetLogo - reading and writing to a text file for Java API use

I want to use the Java API in my NetLogo program. For that, I need to write to a text file and read input from a text file. How can this be done in NetLogo? Additionally - what are the ways by which ...

Using the NetLogo API to get turtle coordinates

I am trying to get coordinates for turtles in NetLogo by using the Java API. I have managed to get the workspace loaded and have been using the following code that I made: public static int getX(...

How to create maze walls in NetLogo?

I am trying to create a 5x5 grid with 2 exits and put some walls in it. In other words, I want to create a maze or a labyrinth. I was wondering if there is a way to make a border line thicker or ...

热门标签