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
  • agent

agent · Changes

Page history
joao.severo created page: agents/agent authored Sep 19, 2018 by João Vitor Bernardi Severo's avatar João Vitor Bernardi Severo
Show whitespace changes
Inline Side-by-side
agents/agent.md 0 → 100644
View page @ 9042593c
The agents are preconfigured and will contain the specification of each agent that can connect with the simulation. During the first connection, the agent is designated with one of the configurations registered previously by the major configuration file sent to the server on the start of the simulation.
# Communication data
The only information that the agent need to send to the simulatio it's its token. With the agent token, the simulation can locate all its data and all the changes that are needed will be attributed and sent back to the agent in the end of the step.
Using the JSON pattern of communication, the exemple of what is expected the agebt to send the server can be seen below:
```JSON
{
"token": "eyauhsuahashuas120912ajsja.umclmasjuemduh01920.auhsukmdclmahas19219"
}
```
* __token__ : An unique identifier given to an agent
# Agent structure
Each agent has some static fields containing information about itself and some fields that can be constantly changed depending on the action of the agent on the previously step.
>The agent class it's only stored inside the server, the agent just need to know its token to `communicate`
```JSON
{
"agentClass": {
"name": "agentA1",
"class": "Drone",
"specs": {
"coord" : {
"coordX" : -30.0277,
"coordY" : -51.2287
},
"speed" : 5,
"recharge" : 10,
"discharge": 2,
"basePhysicalLoad" : 15,
"maxPhysicalLoad" : 25,
"physicalContent" : ["Person", "Apple", "Water"],
"baseDigitalLoad" : 50,
"maxDigitalLoad" : 1000,
"digitalContent" : ["victimPicture", "waterPicture"],
"baseBattery" : 10,
"maxBattery" : 25,
"skils" : ["takePicture", "collectWater"],
"roads" : ["water", "land"],
"route" : [{}]
}
}
}
```
* __class__ : Type of agent (drone, motorcycle, car, etc)
* __specs__ : The attributes of that agent
* __coord__ : The actual location of the agent
* __speed__ : How many 'units' the agent can move in one step
* __recharge/discharge__ : How fast the agent recharge/discharge it's battery
* __base/maxPysicalLoad__ : How much physical volume the agent may carry
* __base/maxDigitalLoad__ : How much digital volume the agent may carry
* __physical/digitalContent__ : What the agent is carrying
* __base/maxBattery__ : The agent's battery size
* __skills__ : Which actions it's capable to do
* __roads__ : Which roads the agent can navigate
* __route__ : The agent route to get to a place (initially empty)
# Personal percepctions
After every step the agent is notified about the changes in the map and its own changes. To avoid repeating all the fields that the `agentClass` has, the informations are limited to the possible changes with it's fields completed or empty, this means that the agent must accept empty fields in the response from the server.
The special field `route` will be changed only if the agent send the request to do a `move` action to keep a track about the route and notice if it changes during the steps.
>All the fields were already explained above
```JSON
{
"coord" : {
"coordX" : -30.0277,
"coordY" : -51.2287
},
"basePhysicalLoad" : 15,
"physicalContent" : ["Person", "Apple", "Water"],
"baseDigitalLoad" : 50,
"digitalContent" : ["victimPicture", "waterPicture"],
"baseBattery" : 10,
"route" : [{}]
}
```
## Roles
The configuration file (can be find in the `ServerConfiguration` file) has all the possible roles to a simulation. The roles attribute is a group of `agentClass`es that was explained above. Each agent will recieve an agentClass ramdonly and it will determine the kind of agent it can be and all the specifications it has to respect.
```JSON
{
"roles": {
"agentClass": {}
}
}
```
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