Repository navigation
PlatformAgent
The unique gama agent represents the running GAMA platform. In addition to platform information, it provides explicit operations for preferences, model execution, tests, and validation. These actions can be called from model code or from the interactive console while an experiment is active.
gama.preferences() lists preferences exposed to GAML with their current values, types, constraints, default values, and restart requirements. Pass a key to inspect one preference:
write gama.preferences("pref_check_memory");
Preference updates are in-memory by default. Set persist: true to write the change to the user's preference store:
gama.set_preference("pref_check_memory", false);
gama.set_preference("pref_check_memory", true, persist: true);
gama.reset_preference("pref_check_memory", persist: true);
The in-memory value is restored when the active experiment closes; a persistent write remains saved in the preference store. Only preferences already marked as GAML-accessible can be inspected or changed this way.
gama.open(model, experiment) opens an experiment from a model path. If another experiment is active, GAMA asks before closing it. The optional confirm argument can be set to false for deliberate scripted experiment chains:
gama.open("/workspace/Project/model.gaml", "first");
gama.open("/workspace/Project/model.gaml", "second", confirm: false);
Model paths can be absolute file paths or workspace-relative paths. Opening an experiment requires the GUI workbench and does not import the model into the workspace.
A playable .gamx archive is launched separately in its isolated player process:
gama.play_package("/path/to/model.gamx");
Playable packages are not regular .gaml files and cannot be launched through this action in headless mode.
gama.run_tests(model) synchronously runs the model's test experiments headlessly and returns a summary for each experiment. gama.validate_workspace() compiles every model discovered in the current workspace and returns a success or diagnostic string per model. gama.validate_code(code, syntax_only: true) validates a GAML snippet without executing it:
write gama.run_tests("/workspace/Project/model.gaml");
write gama.validate_workspace();
write gama.validate_code("1 + 1", syntax_only: true);
Workspace validation and test execution can take time on large workspaces. Validation reports compilation diagnostics; it does not execute models. The interactive console itself still requires an active experiment; these actions do not turn it into a standalone platform shell.
- Installation and Launching
- Workspace, Projects and Models
- Editing Models
- Running Experiments
- Running Headless
- Exporting Projects As Simulation Launchers
- Preferences
gamaplatform agent- Troubleshooting
- Introduction
- Manipulate basic Species
- Global Species
- Defining Advanced Species
- Defining GUI Experiment
- Classes and Objects
- Exploring Models
- Optimizing Models
- Multi-Paradigm Modeling
- Manipulate OSM Data
- Cleaning OSM Data
- Diffusion
- Using Database
- Using Dataframes
- Using FIPA ACL
- Using BDI with BEN
- Using Driving Skill
- Manipulate dates
- Manipulate lights
- Using comodel
- Save and restore Simulations
- Using network
- 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
- Stats Extension
- Sound Extension
- BDI Extension
- FIPA Skill
- Expressions
- Exhaustive list of GAMA Keywords
- Installing the development version
- Introduction to GAMA Java API
- Developing Extensions
- Using GAMA flags
- Export plugin : Technical Documentation
- Creating a release of GAMA
- Documentation generation
- Predator Prey
- Road Traffic
- Incremental Model
- Luneray's flu
- BDI Agents
- Forager RL
- SIR Analysis
- 3D Model