reset-ticks

 

reset-ticks sets the tick counter back to zero. It is only used in models that use tick-based updates. reset-ticks is usually found at the end of a setup procedure.

Things to keep in mind when using reset-ticks:

In the model example below, we have a bike and 5 houses. Our bicycle goes between the houses during the day (between the ticks 10 to 15) and delivers newspapers. At night, it goes back to the center. Every time the tick counter hits 24, we reset the ticks.

 

Try it Yourself

 
 
 
 
 
 
 

What's next?

Once you mastered the reset-ticks primitive, don't stop there. Check out the resources below to improve your NetLogo skills.

 
Published NetLogo models that use the reset-ticks primitive:
 
 
Similar primitives:
tick

Advances the tick counter by 1.

Read more
to

Begins a command procedure

Read more
ask

Asks agents to do things.

Read more
clear-all

Clears all the drawings, turtles, plots, etc., leaving a blank slate.

Read more
 
Learn another primitive: