Model variables¶
During simulation there are 2 different variable categories. State properties and model variables.
State properties are variables that are defined specifically for the simulation. The type of state variable can be a Float, Integer, Boolean, String or Counter. When the simulation starts the state variable of each agent is set to the initial value of the state variable.
Model variables are variables that are defined for a model and can be shared between simulations. A model variable can only store integers. The initial value of the model variable can be randomized per agent during populate and fine-tuned per agent after populate.
Note
Example model variable
An example of a model variable could be the health of the agent. Where the initial value of the health is randomized between 100 and 120.
Defining model variables¶
Model variables are set on a model. When a model is selected the Model Variables panel will appear in the 3d viewport side panel. Inside the panel model variables can be added, renamed, minimum and maximum allowed values can be set and a model variable can be removed.
Populating model variables¶
When populating the Model Variable node can be used to Randomize the value of a model variable for an each agent.
After populate model variables can be fine-tuned for an each agent.
Using model variables in simulation¶
See Check Model Variable and Model Variable Operation nodes on how to use model variables in the simulation.