Skip to content

G__GraphicalEditor

RoiArthurB edited this page Feb 22, 2024 · 1 revision

The Graphical Editor

The graphical editor allows defining a GAMA model through a graphical interface (gadl files). It is based on the Graphiti Eclipse plugin. It allows as well to produce a graphical model (diagram) from a gaml model. A tutorial is available here.

images/graphical_editor/gm_predator_prey.png

Installing the graphical editor

Using the graphical editor requires to install the graphical modeling plug-in. See here for information about plug-ins and their installation.

The graphical editor plug-in is called Graphical_modeling and is directly available from the GAMA update site https://updates.gama-platform.org/graphical_modeling/1.9.0

Note that the graphical editor is still under development. Updates of the plug-in will be added to the GAMA website. After installing the plug-in (and periodically), check for updates for this plug-in: in the "Help" menu, choose "Check for Updates" and install the proposed updates for the graphical modeling plug-in.

Creating a first model

A new diagram can be created in a new GAMA project. First, right-click on a project, then select "New" on the contextual menu. In the New Wizard, select "GAMA -> Model Diagram", then "Next>"

images/graphical_editor/newDiagram.png

In the next Wizard dialog, select the type of diagram (Empty, Skeleton or Example) then the name of the file and the author.

images/graphical_editor/modeldiagramNew.png

Skeleton and Example diagram types allow to add to the diagram some basic features.

Status of models in editors

Similarly to GAML editor, the graphical editor proposes a live display of errors and model statuses. A graphical model can actually be in three different states, which are visually accessible above the editing area: Functional (orange color), Experimentable (green color) and InError (red color). See the section on model validation for more precise information about these statuses.

In its initial state, a model is always in the Functional state, which means it compiles without problems, but cannot be used to launch experiments. The InError state occurs when the file contains errors (syntactic or semantic ones).

Reaching the Experimentable state requires that all errors are eliminated and that at least one experiment is defined in the model. The experiment is immediately displayed as a button in the toolbar, and clicking on it will allow the modeler to launch this experiment on your model.

Experiment buttons are updated in real-time to reflect what's in your code. If more than one experiment is defined, corresponding buttons will be displayed in addition to the first one.

Diagram definition framework

The following figure presents the editing framework:

images/graphical_editor/framework.png

Features

agents

species

images/graphical_editor/species.png

The species feature allows the modeler to define a species with a continuous topology. A species is always a micro-species of another species. The top-level (macro-species of all species) is the world species.

  • source: a species (macro-species)
  • target: -

images/graphical_editor/Frame_Speciesdef1.png

grid

images/graphical_editor/grid.png

The grid feature allows the modeler to define a species with a grid topology. A grid is always a micro-species of another species.

  • source: a species (macro-species)
  • target: -

images/graphical_editor/Frame_grid.png

Inheriting link

The inheriting link feature allows the modeler to define an inheriting link between two species.

  • source: a species (parent)
  • target: a species (child)

images/graphical_editor/inhereting_link.png

world

images/graphical_editor/world.png

When a model is created, a world species is always defined. It represents the global part of the model. The world species, which is unique, is the top-level species. All other species are micro-species of the world species.

images/graphical_editor/Frame_world.png

agent features

action

images/graphical_editor/action.png

The action feature allows the modeler to define an action for a species.

  • source: a species (owner of the action)
  • target: -

images/graphical_editor/Frame_action.png

reflex

images/graphical_editor/reflex.png

The reflex feature allows the modeler to define a reflex for a species.

  • source: a species (owner of the reflex)
  • target: -

images/graphical_editor/Frame_reflex.png

aspect

images/graphical_editor/aspect.png

The aspect feature allows the modeler to define an aspect for a species.

  • source: a species (owner of the aspect)
  • target: -

images/graphical_editor/Frame_aspect.png

images/graphical_editor/Frame_Aspect_layer.png

equation

images/graphical_editor/equation.png

The equation feature allows the modeler to define an equation for a species.

  • source: a species (owner of the equation)
  • target: -

experiment

GUI experiment

images/graphical_editor/guiXP.png

The GUI Experiment feature allows the modeler to define a GUI experiment.

  • source: world species
  • target: -

images/graphical_editor/Frame_Experiment.png

display

images/graphical_editor/display.png

The display feature allows the modeler to define a display.

  • source: GUI experiment
  • target: -

images/graphical_editor/Frame_display.png

images/graphical_editor/Frame_layer_display.png

batch experiment

images/graphical_editor/batchxp.png

The Batch Experiment feature allows the modeler to define a Batch experiment.

  • source: world species
  • target: -

BDI Architecture

Plan

images/graphical_editor/plan.png

The Plan feature allows the modeler to define a plan for a BDI species, i.e. a sequence of statements that will be executed in order to fulfill a particular intention.

  • source: a species with a BDI architecture
  • target: - s

Rule

images/graphical_editor/rule.png

The Rule feature allows the modeler to define a rule for a BDI species, i.e. a function executed at each iteration to infer new desires or beliefs from the agent's current beliefs and desires.

  • source: a species with a BDI architecture
  • target: -

Perception

images/graphical_editor/perception.png

The Perception feature allows the modeler to define a perception for a BDI species, i.e. a function executed at each iteration that updates the agent's Belief base according to the agent perception.

  • source: a species with a BDI architecture
  • target: -

Finite State Machine Architecture

State

images/graphical_editor/state.png

The State feature allows the modeler to define a state for a FSM species, i.e. sequence of statements that will be executed if the agent is in this state (an agent has a unique state at a time).

  • source: a species with a finite state machine architecture
  • target: -

Task-based Architecture

Task

images/graphical_editor/task.png

The Task feature allows the modeler to define a task for a Tasked-based species, i.e. sequence of statements that can be executed, at each time step, by the agent. If an agent owns several tasks, the scheduler chooses a task to execute based on its current priority weight value.

  • source: a species with a task-based architecture
  • target: -

Pictogram color modification

It is possible to change the color of a pictogram.

  • Right-click on a pictogram, then select the "Chance the color".

GAML Model generation

It is possible to automatically generate a Gaml model from a diagram.

  • Right-click on the graphical framework (where the diagram is defined), then select the "Generate Gaml model". A new GAML model with the same name as the diagram is created (and open).
  1. What's new (Changelog)
  1. Installation and Launching
    1. Installation
    2. Launching GAMA
    3. Updating GAMA
    4. Installing Plugins
  2. Workspace, Projects and Models
    1. Navigating in the Workspace
    2. Changing Workspace
    3. Importing Models
  3. Editing Models
    1. GAML Editor (Generalities)
    2. GAML Editor Tools
    3. Validation of Models
  4. Running Experiments
    1. Launching Experiments
    2. Experiments User interface
    3. Controls of experiments
    4. Parameters view
    5. Inspectors and monitors
    6. Displays
    7. Batch Specific UI
    8. Errors View
  5. Running Headless
    1. Headless Batch
    2. Headless Server
    3. Headless Legacy
  6. Preferences
  7. Troubleshooting
  1. Introduction
    1. Start with GAML
    2. Organization of a Model
    3. Basic programming concepts in GAML
  2. Manipulate basic Species
  3. Global Species
    1. Regular Species
    2. Defining Actions and Behaviors
    3. Interaction between Agents
    4. Attaching Skills
    5. Inheritance
  4. Defining Advanced Species
    1. Grid Species
    2. Graph Species
    3. Mirror Species
    4. Multi-Level Architecture
  5. Defining GUI Experiment
    1. Defining Parameters
    2. Defining Displays Generalities
    3. Defining 3D Displays
    4. Defining Charts
    5. Defining Monitors and Inspectors
    6. Defining Export files
    7. Defining User Interaction
  6. Exploring Models
    1. Run Several Simulations
    2. Batch Experiments
    3. Exploration Methods
  7. Optimizing Model Section
    1. Runtime Concepts
    2. Optimizing Models
  8. Multi-Paradigm Modeling
    1. Control Architecture
    2. Defining Differential Equations
  1. Manipulate OSM Data
  2. Diffusion
  3. Using Database
  4. Using FIPA ACL
  5. Using BDI with BEN
  6. Using Driving Skill
  7. Manipulate dates
  8. Manipulate lights
  9. Using comodel
  10. Save and restore Simulations
  11. Using network
  12. Headless mode
  13. Using Headless
  14. Writing Unit Tests
  15. Ensure model's reproducibility
  16. Going further with extensions
    1. Calling R
    2. Using Graphical Editor
    3. Using Git from GAMA
  1. Built-in Species
  2. Built-in Skills
  3. Built-in Architecture
  4. Statements
  5. Data Type
  6. File Type
  7. Expressions
    1. Literals
    2. Units and Constants
    3. Pseudo Variables
    4. Variables And Attributes
    5. Operators [A-A]
    6. Operators [B-C]
    7. Operators [D-H]
    8. Operators [I-M]
    9. Operators [N-R]
    10. Operators [S-Z]
  8. Exhaustive list of GAMA Keywords
  1. Installing the GIT version
  2. Developing Extensions
    1. Developing Plugins
    2. Developing Skills
    3. Developing Statements
    4. Developing Operators
    5. Developing Types
    6. Developing Species
    7. Developing Control Architectures
    8. Index of annotations
  3. Introduction to GAMA Java API
    1. Architecture of GAMA
    2. IScope
  4. Using GAMA flags
  5. Creating a release of GAMA
  6. Documentation generation

  1. Predator Prey
  2. Road Traffic
  3. 3D Tutorial
  4. Incremental Model
  5. Luneray's flu
  6. BDI Agents

  1. Team
  2. Projects using GAMA
  3. Scientific References
  4. Training Sessions

Resources

  1. Videos
  2. Conferences
  3. Code Examples
  4. Pedagogical materials
Clone this wiki locally