Xholon - Stupid Model 7 - Stopping the Model

What is it

This is the 7th in a series of 16 "Stupid Models". It's intended as a starting point for learning how to develop grid and agent-based models using Xholon. It can also be used to compare Xholon with other agent-based modeling tools that have also implemented the Stupid Model series.

This model is intended to show how a model can stop once a pre-defined condition is met. In this case the model should stop when some bug reaches a size of 100. When this happens, the grid display window should close, but the Xholon GUI will remain.

Xholon features

Each time step, each bug, in its act() method in BugStupidModel7.java, checks to see if its size is greater than or equal to 100. If so, it sets the static processingComplete variable to true, which is subsequently checked by AppStupidModel7 in its step() method. It sets the control state to STOPPED, and removes all grid viewers.

Credits and references

Railsback, S., Lytinen, S., Grimm, V. (2005). StupidModel and Extensions: A Template and teaching Tool for Agent-based Modeling Platforms