-
Notifications
You must be signed in to change notification settings - Fork 6
PredatorPrey_step9
RoiArthurB edited this page Feb 27, 2024
·
2 revisions
This 9th step illustrates how to use the pause
action to stop a simulation.
- Addition of a stopping condition for the simulation: when there is no more prey or predator agents, the simulation stops
We add a new reflex that stops the simulation if the number of preys or the number of predators is zero.
global {
...
reflex stop_simulation when: (nb_preys = 0) or (nb_predators = 0) {
do pause ;
}
}
https://github.com/gama-platform/gama.old/blob/GAMA_1.9.2/msi.gama.models/models/Tutorials/Predator%20Prey/models/Model%2009.gaml
- Installation and Launching
- Workspace, Projects and Models
- Editing Models
- Running Experiments
- Running Headless
- Preferences
- Troubleshooting
- Introduction
- Manipulate basic Species
- Global Species
- Defining Advanced Species
- Defining GUI Experiment
- Exploring Models
- Optimizing Models
- Multi-Paradigm Modeling
- Manipulate OSM Data
- Cleaning OSM Data
- Diffusion
- Using Database
- Using FIPA ACL
- Using BDI with BEN
- Using Driving Skill
- Manipulate dates
- Manipulate lights
- Using comodel
- Save and restore Simulations
- Using network
- Headless mode
- Using Headless
- Writing Unit Tests
- Ensure model's reproducibility
- Going further with extensions
- Built-in Species
- Built-in Skills
- Built-in Architecture
- Statements
- Data Type
- File Type
- Expressions
- Exhaustive list of GAMA Keywords
- Installing the GIT version
- Developing Extensions
- Introduction to GAMA Java API
- Using GAMA flags
- Creating a release of GAMA
- Documentation generation