NetLogo banner

Home
Download
Help
Forum
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo Models Library:
Code Examples/Extensions Examples/time

(back to the library)

Discrete Event Mousetrap

[screen shot]

Note: If you download the NetLogo application, every model in the Models Library is included.

WHAT IS IT?

This NetLogo code implements the version of the Mousetrap model described in Section 14.2.5 of Agent-Based and Individual-Based Modeling, Railsback & Grimm (2012). This model is completely independent of the Mousetrap model in NetLogo's Models library. The code is provided as a demonstration of continuous time, or discrete event, scheduling as an alternative to the discrete ticks used in the book's other models using the time extension.

HOW IT WORKS?

This model makes use of several Time extension primitives to demonstrate discrete event scheduling:

time:create time:anchor-to-ticks time:anchor-schedule time:schedule-event time:go time:difference-between time:plus time:schedule-event time:size-of-schedule

See the time extension documentation for more details on each of these primitives.

CREDITS

Prepared by Colin Sheppard and Steve Railsback, 7 Nov 2013.

(back to the NetLogo Models Library)