Skip to main content
Version: 1.8.1

Built-in Species


This file is automatically generated from java files. Do Not Edit It.


It is possible to use in the models a set of built-in agents. These agents allow to directly use some advance features like clustering, multi-criteria analysis, etc. The creation of these agents are similar as for other kinds of agents:

create species: my_built_in_agent returns: the_agent;

So, for instance, to be able to use clustering techniques in the model:

create cluster_builder returns: clusterer;

Table of Contents

agent, AgentDB, base_edge, experiment, graph_edge, graph_node, physical_world,


agent

Variables

  • host (-29): Returns the agent that hosts the population of the receiver agent
  • location (point): Returns the location of the agent
  • name (string): Returns the name of the agent (not necessarily unique in its population)
  • peers (list): Returns the population of agents of the same species, in the same host, minus the receiver agent
  • shape (geometry): Returns the shape of the receiver agent

Actions

_init_

  • returns: unknown

_step_

  • returns: unknown

AgentDB

AgentDB is an abstract species that can be extended to provide agents with capabilities to access databases

Variables

  • agents (list): Returns the list of agents for the population(s) of which the receiver agent is a direct or undirect host
  • members (list): Returns the list of agents for the population(s) of which the receiver agent is a direct host

Actions

close

Close the established database connection.
  • returns: unknown

connect

Establish a database connection.
  • returns: unknown
  • params (map): Connection parameters

executeUpdate

- Make a connection to DBMS - Executes the SQL statement in this PreparedStatement object, which must be an SQL
INSERT, UPDATE or DELETE statement; or an SQL statement that returns nothing, such as a DDL statement.
  • returns: int
  • updateComm (string): SQL commands such as Create, Update, Delete, Drop with question mark
  • values (list): List of values that are used to replace question mark

getParameter

Returns the list used parameters to make a connection to DBMS (dbtype, url, port, database, user and passwd).
  • returns: unknown

insert

- Make a connection to DBMS - Executes the insert statement.
  • returns: int
  • into (string): Table name
  • columns (list): List of column name of table
  • values (list): List of values that are used to insert into table. Columns and values must have same size

isConnected

To check if connection to the server was successfully established or not.
  • returns: bool

select

Make a connection to DBMS and execute the select statement.
  • returns: list
  • select (string): select string
  • values (list): List of values that are used to replace question marks

setParameter

Sets the parameters to use in order to make a connection to the DBMS (dbtype, url, port, database, user and passwd).
  • returns: unknown
  • params (map): Connection parameters

testConnection

To test a database connection .
  • returns: bool
  • params (map): Connection parameters

timeStamp

Get the current time of the system.
  • returns: float

base_edge

A built-in species for agents representing the edges of a graph, from which one can inherit

Variables

  • source (agent): The source agent of this edge
  • target (agent): The target agent of this edge

Actions


experiment

An experiment is a declaration of a graphical user interface. Any experiment attached to a model is a species (introduced by the keyword 'experiment' which directly or indirectly inherits from an abstract species called 'experiment' itself. This abstract species (sub-species of 'agent') defines several attributes and actions that can then be used in any experiment. 'experiment' defines several attributes, which, in addition to the attributes inherited from agent, form the minimal set of knowledge any experiment will have access to.

Variables

  • minimum_cycle_duration (float): The minimum duration (in seconds) a simulation cycle should last. Default is 0. Units can be used to pass values smaller than a second (for instance '10 °msec')
  • model_path (string): Contains the absolute path to the folder in which the current model is located
  • project_path (string): Contains the absolute path to the project in which the current model is located
  • rng (string): The random number generator to use for this simulation. Three different ones are at the disposal of the modeler: mersenne represents the default generator, based on the Mersenne-Twister algorithm. Very reliable; cellular is a cellular automaton based generator that should be a bit faster, but less reliable; and java invokes the standard Java generator
  • rng_usage (int): Returns the number of times the random number generator of the experiment has been drawn
  • seed (float): The seed of the random number generator
  • simulation (-27): Contains a reference to the current simulation being run by this experiment
  • simulations (list): Contains the list of currently running simulations
  • warnings (boolean): The value of the preference 'Consider warnings as errors'
  • workspace_path (string): Contains the absolute path to the workspace of GAMA

Actions

compact_memory

Forces a 'garbage collect' of the unused objects in GAMA
  • returns: unknown

update_outputs

Forces all outputs to refresh, optionally recomputing their values
  • returns: unknown
  • recompute (boolean): Whether or not to force the outputs to make a computation step

graph_edge

A species that represents an edge of a graph made of agents. The source and the target of the edge should be agents

Variables

  • source (agent): The source agent of this edge
  • target (agent): The target agent of this edge

Actions


graph_node

A base species to use as a parent for species representing agents that are nodes of a graph

Variables

  • my_graph (graph): A reference to the graph containing the agent

Actions

This operator should never be called
  • returns: bool
  • other (agent): The other agent

physical_world

The base species for agents that act as a 3D physical world

Variables

  • agents (list): The list of agents registered in this physical world
  • gravity (float): Define if the value for the gravity
  • use_gravity (boolean): Define if the physical world has a gravity or not

Actions

compute_forces

  • returns: unknown
  • step (float): allows to define the time step considered for the physical world agent. If not defined, the physical world agent will use the step global variable.