![]() A discrete event schedule avoids this by keeping a list of events that are scheduled at different times and then running those events when the time comes. So, they have to check each tick if that amount of time has passed. In the case of the Virus model, agents get sick and then only recover after a certain number of ticks. Normally, this would require checking each tick if the right amount of time has passed and then, if it has, doing the action. But, sometimes agents take certain action only occasionally. In many agent-based models, the agents do the same thing every tick. ![]() ![]() HOW IT WORKSĪ discrete event scheduler is a convenient and efficient way of programming agents to do certain actions that don't happen every tick. The model documentation is not duplicated here instead, this tab only discusses the differences between the original Virus model and this discrete event implementation. With the few (but important) exceptions noted below, this model does exactly what the original Virus model did and uses the same code. ![]() NETLOGO BOOLEAN CODEThis is a modification of the "Virus" model in the Biology section of the Models Library to illustrate use of the time extension for "discrete event simulation", which makes the code simpler and faster (see THINGS TO NOTICE below). Note: If you download the NetLogo application, every model in the Models Library is included. (back to the library) Virus Using Discrete Event Simulator NetLogo Models Library: Virus Using Discrete Event Simulator ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |