Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Desastres
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Desastres
  • Desastres
  • Wiki
  • Agents
  • actions

Last edited by Gabriel Henrique Paul Nov 16, 2018
Page history
This is an old version of this page. You can view the most recent version or browse the history.

actions

TODO:

carregarAgente(IdAgente)

passarTurno

Actions

An agent may execute only one action on each step of the simulation. Actions will be executed on the simulator in a random order, and in case two or more actions are conflicting, only the first one executed may yield a successful result. Each action has a series of parameters, sensitive to position, which must be encoded as strings.


move

Action responsible for moving an agent towards a destination. In case of success, ? charge units will be consumed. May be used with 0 parameters if the agent currently has an ongoing route, and also with 1 or 2 parameters.

No Parameter Meaning
0 Facility The name of a facility the agent wants to move to.
No Parameter Meaning
0 Latitude The latitude of the agent's desired destination.
1 Longitude The longitude of the agent's desired destination.
Failure Code Reason
failed_wrong_param The agent has no route to follow (0 parameters), more than 2 parameters were given or the given coordinates were not valid double values (2 parameters).
failed_unknown_facility No facility by the given name exists (1 parameter).
failed_no_route No route to the destination exists or the charge is insufficient to reach the next waypoint.
failed An unforeseen error has occurred.

deliver_physical

Action responsible for delivering physical assets currently held by the agent, such as victims and water samples, to the CDM. This action can be used with 1 or 2 parameters, as the amount of the asset to be delivered is optional, and defaults to the maximum available.

No Parameter Meaning
0 Asset Name of the physical asset to store.
No Parameter Meaning
0 Asset Name of the physical asset to store.
1 Amount Amount of the physical asset to store.
Failure Code Reason
failed_wrong_param More or less than 2 parameters were given.
failed_location The agent is not located in the CDM.
failed_unknown_item No item by the given name is known.
failed_item_amount The given amount is not an integer, less than 1 or greater than what the agent is carrying.
failed An unforeseen error has occurred.

deliver_virtual

Action responsible for delivering virtual assets currently held by the agent, such as photos, to the CDM. This action can be used with 1 or 2 parameters, as the amount of the asset to be delivered is optional, and defaults to the maximum available.

No Parameter Meaning
0 Asset Name of the virtual asset to store.
No Parameter Meaning
0 Asset Name of the virtual asset to store.
1 Amount Amount of the virtual asset to store.
Failure Code Reason
failed_wrong_param More or less than 2 parameters were given.
failed_location The agent is not located in the CDM.
failed_unknown_item No item by the given name is known.
failed_item_amount The given amount is not an integer, less than 1 or greater than what the agent is carrying.
failed An unforeseen error has occurred.

charge

Action responsible for charging the agent's battery. The amount by which the battery is recovered depends on whether it is located at a CDM or not. This action has no parameters.

Failure Code Reason
failed_wrong_param Parameters were given.
failed An unforeseen error has occurred.

rescue_victim

Action responsible for rescuing a victim, identified by it's ID, if there's enough physical_storage available on the agent. This action can be used with 1 parameter.

No Parameter Meaning
0 ID ID of the victim to rescue.
Failure Code Reason
failed_wrong_param More or less than 1 parameter was given.
failed_unknown_item No victim by the given ID is known.
failed_capacity The agent doesn't have enough physical_storage.
failed_location The agent is not in the same location as the victim.
failed An unforeseen error has occurred.

collect_water

Action responsible for collecting a sample of water, if there's enough physical_storage available on the agent. This action has no parameters.

Failure Code Reason
failed_wrong_param Parameters were given.
failed_capacity The agent doesn't have enough physical_storage.
failed_location The agent is not in a location with a water sample.
failed An unforeseen error has occurred.

photograph

Action responsible for taking a photo, if there's enough virtual_storage available on the agent. This action has no parameters.

Failure Code Reason
failed_wrong_param Parameters were given.
failed_capacity The agent doesn't have enough virtual_storage.
failed_location The agent is not in a location with a photography event.
failed An unforeseen error has occurred.

search_social_asset

Action responsible for searching for social assets in the region informed. This action can be used with 1 or 3 parameters, as the center of the search area is optional, and defaults to the agent's current location.

No Parameter Meaning
0 Radius Size of the search area's radius.
No Parameter Meaning
0 Radius Size of the search area's radius.
1 Latitude The latitude of the search area's center.
2 Longitude The longitude of the search area's center.
Failure Code Reason
failed_wrong_param More than 3, 2, or 0 parameters were given or the given parameters were not valid double values.
failed An unforeseen error has occurred.

analyze_photo

Action responsible for analyzing every photo currently held by the agent. In case of success, the photos will be removed from the agent's virtual_storage. This action has no parameters.

Failure Code Reason
failed_wrong_param Parameters were given.
failed_item_amount The agents has no photos to analyze.
failed An unforeseen error has occurred.
Clone repository
  • API
  • QuickStart
  • agents
  • agents
    • actions
    • agent
  • api
    • firstconnection
    • firstmessage
    • how it works
    • stepsmessages
  • Home
  • notes
  • requirements
  • setting enviroment
  • simulation
  • simulation
    • corearchitecture
View All Pages