-
Notifications
You must be signed in to change notification settings - Fork 99
Save and restore simulations
benoitgaudou edited this page Sep 14, 2022
·
8 revisions
Last version of GAMA has introduced new features to save the state of a simulation at a given simulation cycle. This has two main applications:
- The possibility to save the state of a simulation
- The possibility to restore a simulation from this file.
- The possibility to go backward to an older state of a simulation.
experiment saveSimu type: gui {
reflex store when: cycle = 5 {
write "================ START SAVE + self " + " - " + cycle ;
write "Save of simulation : " + save_simulation('saveSimu.gsim');
write "================ END SAVE + self " + " - " + cycle ;
}
output {
display main_display {
species road aspect: geom;
species people aspect: base;
}
}
}
experiment reloadSavedSimuOnly type: gui {
action _init_ {
create simulation from: saved_simulation_file("saveSimu.gsim");
}
output {
display main_display {
species road aspect: geom;
species people aspect: base;
}
}
}
model memorize
global {
init{
create people number:1;
}
}
species people skills: [moving] {
init{
location <- {50, 50};
}
reflex movement {
location <- {location.x + 1,location.y};
}
aspect base {
draw circle(5) color: color;
draw ""+cycle;
}
}
experiment memorizeExp type: memorize {
output {
display map {
species people aspect: base;
}
}
}
- 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 Model Section
- Multi-Paradigm Modeling
- Manipulate 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