|Home|Quick Start|Sprints|Requirements|Architecture|Server Config|API|GIT|Simulation|Agents|
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
The communication between the agent and the server will be given by limited informations that are restricted to what may have changed from one step to another. The JSON file contains two objects separated with the same rules of the first message JSON file. Exemple below.
{
"mapPerceptions" : {
"flood" : {
"coordUpperX" : -30.085000,
"coordUpperY" : -51.245556,
"coordLowerX" : -30.080397,
"coordLowerY" : -51.234005,
},
"victims" : [{"coord1..."}, {"coord2..."}],
"jobs" : [{"job1..."}, {"job2..."}]
},
"personalPerceptions" : {}
}
The first object refer to the map changes like the area of the flood that happened during the simulation, the victims affected by the flood and the jobs (can be empty) defined.
Each victim is resumed to a coordinate
The second object refer to the specific changes of each agent such as: current coordinates, physical load, physical content, digital load, digital content, battery, rout and the result of the previous action. The explanation of these fields can be found in the Agent
file.
Job
All the jobs have an indentifier
to the simulation locate and change the status
of the right job. Besides the identifier and the status, the job also has a list of requiredSkills
and the coord
of the job. The required skills are important to decide if the agent can do the job or not and speed up the response from the server.
It's defined in a JSON style like below:
{
"id": "oelkcmalsk1212klsdklma1",
"coord" : {
"coordX" : -30.0277,
"coordY" : -51.2287
},
"status": "Success",
"requiredSkills": ["takePhoto", "rescue"]
}
-
id : Unique identifier
-
coord : Location of the job
-
status : If the job was
Success
orFailure
*requiredSkills : List of all the skills the agent need to do the job