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 agentlocation
(point
): Returns the location of the agentname
(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 agentshape
(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 hostmembers
(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 markvalues
(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 namecolumns
(list): List of column name of tablevalues
(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 stringvalues
(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