-
Notifications
You must be signed in to change notification settings - Fork 99
HeadlessBatch
RoiArthurB edited this page Sep 11, 2023
·
13 revisions
This headless mode is the Batch one.
The advantage of this mode is how easily it is to prepare and launch, contrarily to the Headless Legacy, this mode does not need any other file than the GAML file holding the experiment of type batch.
You can run your gama experiment with a command similar to this:
./gama-headless.sh [option] -batch experimentName /path/to/file.gaml
- with:
-
-batch
: the flag that indicates it is a batch exploration -
experimentName
: the name of your batch experiment in the following file -
/path/to/file.gaml
: the path (relative or absolute) to the batch experiment
-
Unfortunatly, this mode can't save output data automatically, the actual way to do is saving wanted data inside CSV files from your model.
The example below assumes that your GAMA application is in folder D:\software\
and your project (model) file is in folder D:\my_models\
- You can open Windows PowerShell, change your directory to the headless folder and run gama-headless command:
cd D:\software\GAMA_1.9.2_Windows_with_JDK\headless\
.\gama-headless.bat -batch Optimization D:\my_models\predatorPrey\predatorPrey.gaml
- You can open Command Prompt, change your directory to the headless folder and run gama-headless command:
cd D:\software\GAMA_1.9.2_Windows_with_JDK\headless\
gama-headless.bat -batch Optimization D:\my_models\predatorPrey\predatorPrey.gaml
- Your python script will have the following lines of code, mainly using the
os
package to run the native system commands
import os
os.chdir("D:\software\GAMA_1.9.2_Windows_with_JDK\headless")
os.system("gama-headless.bat -batch Optimization D:\my_models\predatorPrey\predatorPrey.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 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