This file is automatically generated from java files. Do Not Edit It.
Skills are built-in modules, written in Java, that provide a set of related built-in variables and built-in actions (in addition to those already provided by GAMA) to the species that declare them. A declaration of skill is done by filling the skills attribute in the species definition:
species my_species skills: [skill1, skill2] {
...
}
Skills have been designed to be mutually compatible so that any combination of them will result in a functional species. An example of skill is the moving
skill.
So, for instance, if a species is declared as:
species foo skills: [moving]{
...
}
Its agents will automatically be provided with the following variables : speed
, heading
, destination
and the following actions: move
, goto
, wander
, follow
in addition to those built-in in species and declared by the modeller. Most of these variables, except the ones marked read-only, can be customized and modified like normal variables by the modeller. For instance, one could want to set a maximum for the speed; this would be done by redeclaring it like this:
float speed max:100 min:0;
Or, to obtain a speed increasing at each simulation step:
float speed max:100 min:0 <- 1 update: speed * 1.01;
Or, to change the speed in a behavior:
if speed = 5 {
speed <- 10;
}
advanced_driving, driving, fipa, GAMASQL, grid, MDXSKILL, messaging, moving, moving3D, network, physics, skill_road, skill_road_node, SQLSKILL,
current_index
(int
): the current index of the agent target (according to the targets list)current_lane
(int
): the current lane on which the agent iscurrent_path
(path
): the current path that tha agent followcurrent_road
(agent
): current road on which the agent iscurrent_target
(point
): the current target of the agentdistance_to_goal
(float
): euclidean distance to the next point of the current segmentfinal_target
(point
): the final target of the agentmax_acceleration
(float
): maximum acceleration of the car for a cyclemax_speed
(float
): maximal speed of the vehicleon_linked_road
(boolean
): is the agent on the linked road?proba_block_node
(float
): probability to block a node (do not let other driver cross the crossroad)proba_lane_change_down
(float
): probability to change lane to a lower lane (right lane if right side driving) if necessaryproba_lane_change_up
(float
): probability to change lane to a upper lane (left lane if right side driving) if necessaryproba_respect_priorities
(float
): probability to respect priority (right or left) lawsproba_respect_stops
(list
): probability to respect stop laws - one value for each type of stopproba_use_linked_road
(float
): probability to change lane to a linked road lane if necessaryreal_speed
(float
): the actual speed of the agent (in meter/second)right_side_driving
(boolean
): are drivers driving on the right size of the road?security_distance_coeff
(float
): the coefficient for the computation of the the min distance between two drivers (according to the vehicle speed - security_distance = 1#m + security_distance_coeff *
real_speed )segment_index_on_road
(int
): current segment index of the agent on the current roadspeed
(float
): the speed of the agent (in meter/second)speed_coeff
(float
): speed coefficient for the speed that the driver want to reach (according to the max speed of the road)targets
(list
): the current list of points that the agent has to reach (path)vehicle_length
(float
): the length of the vehicle (in meters)advanced_follow_driving
moves the agent towards along the path passed in the arguments while considering the other agents in the network (only for graph topology)
path
(path): a path to be followed.target
(point): the target to reachspeed
(float): the speed to use for this move (replaces the current value of speed)time
(float): time to travelcompute_path
action to compute a path to a target location according to a given graph
graph
(graph): the graph on wich compute the pathtarget
(agent): the target node to reachsource
(agent): the source node (optional, if not defined, closest node to the agent location)on_road
(agent): the road on which the agent is located (optional)drive
action to drive toward the final target
drive_random
action to drive by chosen randomly the next road
proba_roads
(map): a map containing for each road (key), the probability to be selected as next road (value)external_factor_impact
action that allows to define how the remaining time is impacted by external factor
new_road
(agent): the road on which to the driver wants to goremaining_time
(float): the remaining timeis_ready_next_road
action to test if the driver can take the given road at the given lane
new_road
(agent): the road to testlane
(int): the lane to testlane_choice
action to choose a lane
new_road
(agent): the road on which to choose the lanepath_from_nodes
action to compute a path from a list of nodes according to a given graph
graph
(graph): the graph on wich compute the pathnodes
(list): the list of nodes composing the pathspeed_choice
action to choose a speed
new_road
(agent): the road on which to choose the speedtest_next_road
action to test if the driver can take the given road
new_road
(agent): the road to testlanes_attribute
(string
): the name of the attribut of the road agent that determine the number of road lanesliving_space
(float
): the min distance between the agent and an obstacle (in meter)obstacle_species
(list
): the list of species that are considered as obstaclesspeed
(float
): the speed of the agent (in meter/second)tolerance
(float
): the tolerance distance used for the computation (in meter)follow_driving
moves the agent along a given path passed in the arguments while considering the other agents in the network.
speed
(float): the speed to use for this move (replaces the current value of speed)path
(path): a path to be followed.return_path
(boolean): if true, return the path followed (by default: false)move_weights
(map): Weigths used for the moving.living_space
(float): min distance between the agent and an obstacle (replaces the current value of living_space)tolerance
(float): tolerance distance used for the computation (replaces the current value of tolerance)lanes_attribute
(string): the name of the attribut of the road agent that determine the number of road lanes (replaces the current value of lanes_attribute)goto_driving
moves the agent towards the target passed in the arguments while considering the other agents in the network (only for graph topology)
target
(geometry): the location or entity towards which to move.speed
(float): the speed to use for this move (replaces the current value of speed)on
(any type): list, agent, graph, geometry that restrains this move (the agent moves inside this geometry)return_path
(boolean): if true, return the path followed (by default: false)move_weights
(map): Weigths used for the moving.living_space
(float): min distance between the agent and an obstacle (replaces the current value of living_space)tolerance
(float): tolerance distance used for the computation (replaces the current value of tolerance)lanes_attribute
(string): the name of the attribut of the road agent that determine the number of road lanes (replaces the current value of lanes_attribute)The fipa skill offers some primitives and built-in variables which enable agent to communicate with each other using the FIPA interaction protocol.
accept_proposals
(list
): A list of ‘accept_proposal’ performative messages of the agent’s mailbox having .agrees
(list
): A list of ‘accept_proposal’ performative messages.cancels
(list
): A list of ‘cancel’ performative messages.cfps
(list
): A list of ‘cfp’ (call for proposal) performative messages.conversations
(list
): A list containing the current conversations of agent. Ended conversations are automatically removed from this list.failures
(list
): A list of ‘failure’ performative messages.informs
(list
): A list of ‘inform’ performative messages.proposes
(list
): A list of ‘propose’ performative messages .queries
(list
): A list of ‘query’ performative messages.refuses
(list
): A list of ‘propose’ performative messages.reject_proposals
(list
): A list of ‘reject_proposals’ performative messages.requests
(list
): A list of ‘request’ performative messages.requestWhens
(list
): A list of ‘request-when’ performative messages.subscribes
(list
): A list of ‘subscribe’ performative messages.accept_proposal
Replies a message with an ‘accept_proposal’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messageagree
Replies a message with an ‘agree’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messagecancel
Replies a message with a ‘cancel’ peformative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messagecfp
Replies a message with a ‘cfp’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messageend_conversation
Reply a message with an ‘end_conversation’ peprformative message. This message marks the end of a conversation. In a ‘no-protocol’ conversation, it is the responsible of the modeler to explicitly send this message to mark the end of a conversation/interaction protocol.
message
(24): The message to be repliedcontents
(list): The content of the replying messagefailure
Replies a message with a ‘failure’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messageinform
Replies a message with an ‘inform’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messagepropose
Replies a message with a ‘propose’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messagequery
Replies a message with a ‘query’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messagerefuse
Replies a message with a ‘refuse’ performative message.
message
(24): The message to be repliedcontents
(list): The contents of the replying messagereject_proposal
Replies a message with a ‘reject_proposal’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messagereply
Replies a message. This action should be only used to reply a message in a ‘no-protocol’ conversation and with a ‘user defined performative’. For performatives supported by GAMA (i.e., standard FIPA performatives), please use the ‘action’ with the same name of ‘performative’. For example, to reply a message with a ‘request’ performative message, the modeller should use the ‘request’ action.
message
(24): The message to be repliedperformative
(string): The performative of the replying messagecontents
(list): The content of the replying messagerequest
Replies a message with a ‘request’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messagesend
Starts a conversation/interaction protocol.
to
(list): A list of receiver agentscontents
(list): The content of the message. A list of any GAML typeperformative
(string): A string, representing the message performativeprotocol
(string): A string representing the name of interaction protocolstart_conversation
Starts a conversation/interaction protocol.
to
(list): A list of receiver agentscontents
(list): The content of the message. A list of any GAML typeperformative
(string): A string, representing the message performativeprotocol
(string): A string representing the name of interaction protocolsubscribe
Replies a message with a ‘subscribe’ performative message.
message
(24): The message to be repliedcontents
(list): The content of the replying messageread
params
(map): Connection parameterstable
(string): select string with question marksfilter
(list): List of values that are used to replace question marksSqlObject
params
(map): Connection parameterstable
(string): select string with question marksfilter
(string): Filter for selecttestConnection
params
(map): Connection parametersbands
(list
): Represents the values of the different bands of the cell (list of floating point value automatically set when the grid is initialized from a grid file)color
(rgb
): Represents the color of the cell, used by default to represent the grid on displaysgrid_value
(float
): Represents a floating point value (automatically set when the grid is initialized from a grid file, and used by default to represent the elevation of the cell when displaying it on a display)grid_x
(int
): Returns the 0-based index of the column of the cell in the gridgrid_y
(int
): Returns the 0-based index of the row of the cell in the gridneighbors
(list
): Represents the neighbor at distance 1 of the cellselect
params
(map): Connection parametersonColumns
(string): select string with question marksonRows
(list): List of values that are used to replace question marksfrom
(list): List of values that are used to replace question markswhere
(list): List of values that are used to replace question marksvalues
(list): List of values that are used to replace question markstestConnection
params
(map): Connection parameterstimeStamp
A simple skill that provides agents with a mailbox than can be filled with messages
mailbox
(list
): The list of messages that can be consulted by the agentsend
to
(any type): The agent, or server, to which this message will be sent tocontents
(any type): The contents of the message, an arbitrary objectThe moving skill is intended to define the minimal set of behaviours required for agents that are able to move on different topologies
current_edge
(geometry
): Represents the agent/geometry on which the agent is located (only used with a graph)current_path
(path
): Represents the path on which the agent is moving on (goto action on a graph)destination
(point
): Represents the next location of the agent if it keeps its current speed and heading (read-only)heading
(int
): Represents the absolute heading of the agent in degrees.location
(point
): Represents the current position of the agentreal_speed
(float
): Represents the actual speed of the agent (in meter/second)speed
(float
): Represents the speed of the agent (in meter/second)follow
moves the agent along a given path passed in the arguments.
speed
(float): the speed to use for this move (replaces the current value of speed)path
(path): a path to be followed.move_weights
(map): Weights used for the moving.return_path
(boolean): if true, return the path followed (by default: false)goto
moves the agent towards the target passed in the arguments.
target
(geometry): the location or entity towards which to move.speed
(float): the speed to use for this move (replaces the current value of speed)on
(any type): graph, topology, list of geometries that restrain this moverecompute_path
(boolean): if false, the path is not recompute even if the graph is modified (by default: true)return_path
(boolean): if true, return the path followed (by default: false)move_weights
(map): Weights used for the moving.move
moves the agent forward, the distance being computed with respect to its speed and heading. The value of the corresponding variables are used unless arguments are passed.
speed
(float): the speed to use for this move (replaces the current value of speed)heading
(int): the angle (in degree) of the target direction.bounds
(geometry): the geometry (the localized entity geometry) that restrains this move (the agent moves inside this geometrywander
Moves the agent towards a random location at the maximum distance (with respect to its speed). The heading of the agent is chosen randomly if no amplitude is specified. This action changes the value of heading.
speed
(float): the speed to use for this move (replaces the current value of speed)amplitude
(int): a restriction placed on the random heading choice. The new heading is chosen in the range (heading - amplitude/2, heading+amplitude/2)bounds
(geometry): the geometry (the localized entity geometry) that restrains this move (the agent moves inside this geometry)on
(graph): the graph that restrains this move (the agent moves on the graphproba_edges
(map): When the agent moves on a graph, the probability to choose another edge. If not defined, each edge has the same probability to be chosenThe moving skill 3D is intended to define the minimal set of behaviours required for agents that are able to move on different topologies
destination
(point
): continuously updated destination of the agent with respect to its speed and heading (read-only)heading
(int
): the absolute heading of the agent in degrees (in the range 0-359)pitch
(int
): the absolute pitch of the agent in degrees (in the range 0-359)roll
(int
): the absolute roll of the agent in degrees (in the range 0-359)speed
(float
): the speed of the agent (in meter/second)move
moves the agent forward, the distance being computed with respect to its speed and heading. The value of the corresponding variables are used unless arguments are passed.
speed
(float): the speed to use for this move (replaces the current value of speed)heading
(int): int, optional, the direction to take for this move (replaces the current value of heading)pitch
(int): int, optional, the direction to take for this move (replaces the current value of pitch)heading
(int): int, optional, the direction to take for this move (replaces the current value of roll)bounds
(geometry): the geometry (the localized entity geometry) that restrains this move (the agent moves inside this geometrynetwork_groups
(list
): Net ID of the agentnetwork_name
(string
): Net ID of the agentnetwork_server
(list
): Net ID of the agentconnect
protocol
(string): protocol type (udp, tcp, mqqt)port
(int): port numberwith_name
(string): server nameLlogin
(string): server nameLpassword
(string): server nameLto
(string): server URLexecute
command
(string): command to executefetch_message
has_more_message
leave_the_group
leave a group of agent
with_name
(string): name of the group agent want to leavecollisionBound
(map
):density
(float
):mass
(float
):motor
(point
):space
(agent
):velocity
(list
):agents_on
(list
): for each lane of the road, the list of agents for each segmentall_agents
(list
): the list of agents on the roadlanes
(int
): the number of laneslinked_road
(-18
): the linked road: the lanes of this linked road will be usable by drivers on the roadmaxspeed
(float
): the maximal speed on the roadsource_node
(agent
): the source node of the roadtarget_node
(agent
): the target node of the roadregister
register the agent on the road at the given lane
agent
(agent): the agent to register on the road.lane
(int): the lane index on which to register; if lane index >= number of lanes, then register on the linked roadunregister
unregister the agent on the road
agent
(agent): the agent to unregister on the road.block
(map
): define the list of agents blocking the node, and for each agent, the list of concerned roadspriority_roads
(list
): the list of priority roadsroads_in
(list
): the list of input roadsroads_out
(list
): the list of output roadsstop
(list
): define for each type of stop, the list of concerned roadsexecuteUpdate
params
(map): Connection parametersupdateComm
(string): SQL commands such as Create, Update, Delete, Drop with question markvalues
(list): List of values that are used to replace question markgetCurrentDateTime
dateFormat
(string): date format examples: ‘yyyy-MM-dd’ , ‘yyyy-MM-dd HH:mm:ss’getDateOffset
dateFormat
(string): date format examples: ‘yyyy-MM-dd’ , ‘yyyy-MM-dd HH:mm:ss’dateStr
(string): Start dateoffset
(string): number on day to increase or decreaseinsert
params
(map): Connection parametersinto
(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 sizelist2Matrix
param
(list): Param: a list of records and metadatagetName
(boolean): getType: a boolean value, optional parametergetType
(boolean): getType: a boolean value, optional parameterselect
params
(map): Connection parametersselect
(string): select string with question marksvalues
(list): List of values that are used to replace question markstestConnection
params
(map): Connection parameterstimeStamp