mirror of
https://github.com/gama-platform/gama.git
synced 2026-07-09 18:21:00 +00:00
Page:
Save and restore simulations
Pages
3D_Graph
3D_shapefile_loading
ASCII_File_to_DEM_Representation
Accessing_Fields
Agent_Based_Clustering
AnalysingCodePerformance
Anisotropic_Diffusion_Simple_Field
AntsForaging.gaml
AntsForaging
Boids_3D_Motion
CallingR
Casting_Images
Changelog
City_Evacuation
CleaningGISData
CodeExamples
Community
Computation_of_the_shortest_path_on_a_Grid_of_Cells
ContinuousFieldofVision.gaml
ContinuousMove
Contour_Lines_Import
CreatingAReleaseOfGama
Creating_color_and_sort_cubes_by_color
DEM_Generator
DXF_to_Agents_Model
Developing Plugins
DifferentialEquations
Directed_Graph_Model
Drive_Random
ESRI_ASCII_to_grid_model
Ensure model reproducibility
Eroding_Volcano
Exhaustive list of GAMA Keywords
FallingObjects
Flow_on_Terrain
GEOJSON_File_Loading
G__BlankPage
G__GraphicalEditor
G__GraphicalEditorTutorial
GamlReferences
GetGamaDevCodeUsingEclipsePlugin
Graph_Generation
Graph_Generation_using_Agents
Headless mode for dummies
HeadlessBatch
HeadlessLegacy
HeadlessServer
HeadlessTutorial
Home
HydrologicaModel
Image_Manipulation
Image_Vectorisation
Index
InstallingDevVersion
Introduction To Gama Java API
K_Nearest_Neighbors
Life
MODAVI
MondrianCity
Movement_of_an_agent_on_different_paths
Movement_on_a_Graph_created_by_Polygons
Movement_on_a_Grid_of_Cells
Movement_on_a_Grid_of_Cells_
Moving3D
Moving_3D_Object
NetlogoTrafficmodel2
ODE_LotkaVolterra
OSM_file_to_Agents
Pedagogical Materials
PlayPool
PreviousConferences
Resources_TrainingVideos
RunningHeadless
SIRAnalysis
SIRAnalysis_step1
SIRAnalysis_step2
SIRAnalysis_step3
SIRAnalysis_step4
SIRAnalysis_step5
SIRAnalysis_step6
SIRAnalysis_step7
SIR_Split_in_Agents_Multiple_Strains
Save and restore simulations
Segregation_Agents
Series
Shapefile_to_Agents
Simple_Intersection
Simple_Traffic_Model
Soccer_Game
SpatialGraph3d
Stochastic_Differential_Equations
Strahler
Sugarscape
Team
Traffic_and_Pollution
TreesAndSeasons
UserResources
Using extensions
UsingGamaFlags
Wander
Waterflowgridelevation
Writing_Tests
comparison_ABM_EBM_SIR
developingGAMA
generate_pedestrian_paths
pedestrian_complex_environment
pedestrian_simple_environment
stairs
No results
1
Save and restore simulations
RoiArthurB edited this page 2024-02-22 19:17:53 +07:00
Table of Contents
Save and Restore simulations
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.
Save 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;
}
}
}
Restore a simulation
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;
}
}
}
Memorize simulation
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;
}
}
}
Home
Platform
- Installation and Launching
- Workspace, Projects and Models
- Editing Models
- Running Experiments
- Running Headless
- Preferences
- Troubleshooting
Learn GAML step by step
- Introduction
- Manipulate basic Species
- Global Species
- Defining Advanced Species
- Defining GUI Experiment
- Exploring Models
- Optimizing Models
- Multi-Paradigm Modeling
Recipes
- 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
GAML References
- Built-in Species
- Built-in Skills
- Built-in Architecture
- Statements
- Data Type
- File Type
- Expressions
- Exhaustive list of GAMA Keywords
Developing GAMA
- Installing the development version
- Developing Extensions
- Introduction to GAMA Java API
- Using GAMA flags
- Creating a release of GAMA
- Documentation generation