|Home|Quick Start|Sprints|Requirements|Architecture|Server Config|API|Simulation|Agents|
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
Simulation Core:
The memory field represents internal memory state of the simulation.
generate_simulation
Generate the first simulation based on the 'config.json' file wich contains all the initial configuration. If successfully generated, returns the initial simulation state with all the events that will occur. Else, shows an explanation of the error.
No | Parameter | Memory | Meaning |
---|---|---|---|
0 | config.json | No | Configuration file containing the initial configuration required to start the simulator. |
Failure_Code | Reason |
---|---|
InvalidFileException | Invalid configurations. Some fields may be wrong or missing. |
load_simulation
Receives to lists, one with all the events that will occur and the other with all the agents in the simulation. If successfull, it's sent to the agents the initial perception of the simulation, the simulation state saved along with the events list and the agents list.
No | Parameter | Memory | Meaning |
---|---|---|---|
0 | events_list | Yes | The list of all the events that will happen during the simulation |
1 | agents_list | Yes | The list of all the agents that can be in the simulation |
Failure_Code | Reason |
---|---|
InvalidFileException | Invalid configurations. Some fields may be wrong or missing. |
step
Handle the actions of each agent, including the done actions and the undone actions and, if all the responses from the agents are correct, the simulation update the simulaton state and the agents perceptions sending back theses informations to the agents. This method uses the previously simulation step from the internal represented memory and save the new simulation state to the internal memory.
No | Parameter | Memory | Meaning |
---|---|---|---|
0 | actions_list | No | List containing all the actions of the agents. |
Image showing the possible flows of the simulation