-
Notifications
You must be signed in to change notification settings - Fork 99
BuiltInSpecies
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;
agent, AgentDB, base_edge, experiment, graph_edge, graph_node, physical_world,
-
host
(agent
): Returns the agent that hosts the population of the receiver agent -
index
(int
): Returns the unique index of this agent in its population. Read-only attribute -
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
Returned type: unknown
Returned type: unknown
AgentDB is an abstract species that can be extended to provide agents with capabilities to access databases
-
agents
(list
): Returns the list of agents for the population(s) of which the receiver agent is a direct or undirect host -
members
(container
): Returns the list of agents for the population(s) of which the receiver agent is a direct host
Close the established database connection.
Returned type: unknown
: Returns null if the connection was successfully closed, otherwise, it returns an error.
Establish a database connection.
Returned type: unknown
: Returns null if connection to the server was successfully established, otherwise, it returns an error.
-
params
(map): Connection parameters
- 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.
Returned type: int
: Returns the number of updated rows.
-
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
Returns the list used parameters to make a connection to DBMS (dbtype, url, port, database, user and passwd).
Returned type: unknown
: Returns the list of used parameters to make a connection to DBMS.
- Make a connection to DBMS - Executes the insert statement.
Returned type: int
: Returns the number of updated rows.
-
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
To check if connection to the server was successfully established or not.
Returned type: bool
: Returns true if connection to the server was successfully established, otherwise, it returns false.
Make a connection to DBMS and execute the select statement.
Returned type: list
: Returns the obtained result from executing the select statement.
-
select
(string): select string -
values
(list): List of values that are used to replace question marks
Sets the parameters to use in order to make a connection to the DBMS (dbtype, url, port, database, user and passwd).
Returned type: unknown
: null.
-
params
(map): Connection parameters
To test a database connection .
Returned type: bool
: Returns true if connection to the server was successfully established, otherwise, it returns false.
-
params
(map): Connection parameters
Get the current time of the system.
Returned type: float
: Current time of the system in millisecondes
A built-in species for agents representing the edges of a graph, from which one can inherit
-
source
(agent
): The source agent of this edge -
target
(agent
): The target agent of this edge
GUI experiments are experiments used to visualise and interact with simulations through the regular user interface of GAMA. They can declare, parameters, used to populate the Parameters view, outputs like displays or monitors
-
maximum_cycle_duration
(float
): The maximum duration (in seconds) a simulation cycle should last. Default is 1. Units can be used to pass values greater than a second (for instance '10 #sec') -
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 -
parameters
(map
): A parameters set of this experiment agent -
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. Four different ones are at the disposal of the modeler: 'mersenne' represents the default generator, based on the Mersenne-Twister algorithm. Very reliable, fast and deterministic (that is, using the same seed and the same sequence of calls, it will return the same stream of pseudo-random numbers). This algorithm is however not safe to use in simulations where agents can behave in parallel; 'threaded' is a very fast generator, based on the DotMix algorithm, that can be safely used in parallel simulations as it creates one instance per thread. However, determinism cannot be guaranteed and this algorithm does not accept a seed as each instance will compute its own;'parallel' is a version of the Mersenne-Twister algorithm that can be safely used in parallel simulations by preventing a concurrent access to its internal state. Determinism is guaranteed (in terms of generation, but not in terms of execution, as the sequence in which the threads will access it cannot be determined) and it performs a bit slower than its base version.'java' invokes the standard generator provided by the JDK, deterministic and thread-safe, albeit slower than all the other ones -
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. Each time it is set, the random number generator is reinitialized. WARNING: Setting it to zero actually means that you let GAMA choose a random seed -
simulation
(agent
): Contains a reference to the current simulation being run by this experiment -
simulations
(list
): Contains the list of currently running simulations -
workspace_path
(string
): Contains the absolute path to the workspace of GAMA
Forces a 'garbage collect' of the unused objects in GAMA
Returned type: unknown
Forces all outputs to refresh, optionally recomputing their values
Returned type: unknown
-
recompute
(boolean): Whether or not to force the outputs to make a computation step
A species that represents an edge of a graph made of agents. The source and the target of the edge should be agents
-
source
(agent
): The source agent of this edge -
target
(agent
): The target agent of this edge
A base species to use as a parent for species representing agents that are nodes of a graph
-
my_graph
(graph
): A reference to the graph containing the agent
This operator should never be called
Returned type: bool
-
other
(agent): The other agent
The base species for models that act as a 3D physical world. Can register and manage agents provided with either the 'static_body' or 'dynamic_body' skill. Inherits from 'static_body', so it can also act as a physical body itself (with a 'mass', 'friction', 'gravity'), of course without motion -- in this case, it needs to register itself as a physical agent using the 'register' action
-
accurate_collision_detection
(boolean
): Enables or not a better (but slower) collision detection -
automated_registration
(boolean
): If set to true (the default), makes the world automatically register and unregister agents provided with either the 'static_body' or 'dynamic_body' skill. Otherwise, they must be registered using the 'register' action, which can be useful when only some agents need to be considered as 'physical agents'. Note that, in any case, the world needs to manually register itself if it is supposed to act as a physical body. -
gravity
(point
): Defines the value of gravity in this world. The default value is set to -9.80665 on the z-axis, that is 9.80665 m/s2 towards the 'bottom' of the world. Can be set to any direction and intensity and applies to all the bodies present in the physical world -
library
(string
): This attribute allows to manually switch between two physics library, named 'bullet' and 'box2D'. The Bullet library, which comes in two flavors (see 'use_native') and the Box2D libray in its Java version (https://github.com/jbox2d/jbox2d). Bullet is the default library but models in 2D should better use Box2D -
max_substeps
(int
): If equal to 0 (the default), makes the simulation engine be stepped alongside the simulation (no substeps allowed). Otherwise, sets the maximum number of physical simulation substeps that may occur within one GAMA simulation step -
terrain
(field
): This attribute is a matrix of float that can be used to represent a 3D terrain. The shape of the world, in that case, should be a box, where thedimension on the z-axis is used to scale the z-values of the DEM. The world needs to be register itself as a physical object -
use_native
(boolean
): This attribute allows to manually switch between the Java version of the Bullet library (JBullet, a modified version of https://github.com/stephengold/jbullet, which corresponds to version 2.72 of the original library) and the native Bullet library (Libbulletjme, https://github.com/stephengold/Libbulletjme, which is kept up-to-date with the 3.x branch of the original library).The native version is the default one unless the libraries cannot be loaded, making JBullet the default
An action that allows to register agents in this physical world. Unregistered agents will not be governed by the physical laws of this world. If the world is to play a role in the physical world,then it needs to register itself (i.e. do register([self]);
Returned type: unknown
-
bodies
(container): the list or container of agents to register in this physical world
- 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