mirror of
https://github.com/gama-platform/gama.git
synced 2026-07-09 18:21:00 +00:00
Page:
HeadlessBatch
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
2
HeadlessBatch
Baptiste Lesquoy edited this page 2025-12-09 18:00:48 +07:00
Headless Batch
Getting started
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.
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 explorationexperimentName: the name of your batch experiment in the following file/path/to/file.gaml: the path (relative or absolute) to the batch experiment
Simulation Output
Unfortunatly, this mode can't save output data automatically, the actual way to do is saving wanted data inside CSV files from your model.
Calling GAMA headless on Windows
The example below assumes that your GAMA application is in folder D:\software\ and your project (model) file is in folder D:\my_models\
Windows PowerShell
- 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
Command Prompt
- 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
Python Script
- Your python script will have the following lines of code, mainly using the
ospackage 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")
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