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
  • Simulation
  • serverconfiguration

serverconfiguration · Changes

Page history
joao.severo created page: simulation/serverconfiguration authored Sep 19, 2018 by João Vitor Bernardi Severo's avatar João Vitor Bernardi Severo
Hide whitespace changes
Inline Side-by-side
simulation/serverconfiguration.md 0 → 100644
View page @ 3ab9c8e3
## Configuration
The server reads its configuration from JSON files. The first start of the server needs the file to be given in order to start the simulation. If the user are running the same simulation multiple times, it's not needed to give the configuration file every time.
The structure of a configuration file can be seen in the exemple below. The individual parts are explained in the following.
```JSON
{
"server" : {},
"match" : []
}
```
## server
The server block defines the configuration for the whole simulation. It will maintain without changes during all the simulation
>Any request of connection after reached the limit of agents before the start or during the simulation will be ignored
```JSON
"server" : {
"agentsPerSimulation" : 10,
"launch" : "key",
"port" : 12300,
"agentTimeout" : 4000,
"resultPath" : "results",
"logPath" : "logs",
"replayPath" : "replays"
}
```
* __agentsPerSimulation__ : The number of agents that the simulator can connect at the beginning of the simulation
* __lauch__ : The way the simulation will start every step
* `key`: The server will wait the user enter the key to start
* `[Int]s`: The server waits a several seconds to start
* __port__ : The port on which to listen for incoming connections
* __agentTimeOut__ : The limit timme to an agent send its action to the server
* __resultPath__ : The directory which will contain all the information about victims, deaths and materials collected
* __logPath__ : The directory with all the steps and actions done during the simulation
* __replayPath__ : The simulation state can be saved after every step. Those replay files can be used again with the web monitor
## match
This block describes exactly how each simulation will be set up and is mostly scenario dependent. One object in the match array represents one simulation.
```JSON
"match": [{
"id" : "2018-SampleSimulation",
"scenarioClass" : "city.CitySimulation",
"steps" : 1000,
"map" : "paris",
"minLon" : 2.26,
"maxLon" : 2.41,
"minLat" : 48.82,
"maxLat" : 48.90,
"centerLat" : 48.8424,
"centerLon" : 2.3209,
"cellSize" : 200,
"randomSeed" : 17,
"randomFail" : 1,
"rechargeRate" : 2,
"roles" : {},
"generate" : {}
}]
```
* __id__ : Identifier of the simulation
* __scenarioClass__ : The path of the scenario's main class
* __steps__ : Number of steps the simulation will last
* __map__ : The map that will be used in this simulation
* __min/maxLon/Lat__ : The limits where the simulation will happen
* __centerLon/Lat__ : An internal value used for positioning things and routing; basically, any location of the map is considered reachable if there exists a route between this "center" and that location in both directions
* __cellSize__ : The length in meters an agent with speed 1 could travel in a single step
* __randomSeed__ : The random seed that is used for map generation and action execution
* __randomFail__ : The probability for any action to fail (in %)
* __rechargeRate__ : The energy that is restored between 1 and 2 times with 1 recharge action
* __roles__ : Can be seen in the `Agents` file
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