public class Model
extends java.lang.Object
The model has an Environment, containing raster data.
It also has a series of Agent objects.
Each iteration of the model, the agent's run method is called.
The model also implements a model-wide stopping criterion.
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<Agent> |
agents
List of all agents.
|
private int |
height
Default environment height.
|
private int |
numberOfAgents
Number of agents in model.
|
private int |
numberOfIterations
Number of timesteps in model.
|
private int |
width
Default environment width.
|
private Environment |
world
Environment to store raster data.
|
Constructor and Description |
---|
Model()
Model constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
buildAgents()
Makes the agents.
|
private void |
buildWorld()
Makes the world with initial values.
|
static void |
main(java.lang.String[] args)
Just calls the constructor.
|
private void |
runAgents()
Runs the agents.
|
private boolean |
stoppingCriteriaMet()
Checks stopping criteria.
|
private int numberOfIterations
private int numberOfAgents
private int width
private int height
private java.util.ArrayList<Agent> agents
private Environment world
private void buildWorld()
private void buildAgents()
private void runAgents()
private boolean stoppingCriteriaMet()
public static void main(java.lang.String[] args)
args
- String sequence. Unused.