|
|
This page explains the XML files that UMANS takes as input. It describes all options for these input files, so that you can create new scenarios yourself.
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
# Introduction
|
|
|
|
|
|
The main input of a UMANS simulation is an XML file that describes a crowd-simulation scenario.
|
|
|
|
|
|
The [*examples*](https://gitlab.inria.fr/OCSR/UMANS/-/tree/master/examples) folder of the UMANS Git repository contains many working examples. We encourage you to first run a few of these examples in the UMANS GUI, to get an idea of what the files do.
|
|
|
|
|
|
If you have seen the example files in action, and if you now want to create a scenario of your own, this page helps you by defining all ingredients of an XML input file.
|
|
|
|
|
|
# Main structure
|
|
|
|
|
|
Overall, an XML input file for UMANS has the following structure:
|
|
|
|
|
|
```
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
<Simulation ...>
|
|
|
<World ...> ... </World>
|
|
|
<Agents> ... </Agents>
|
|
|
<Policies>... </Policies>
|
|
|
</Simulation>
|
|
|
```
|
|
|
|
|
|
### Overview of elements
|
|
|
|
|
|
- The main element is called `Simulation`. It has several attributes for the main simulation settings.
|
|
|
- The `World` element describes the environment in which the simulation takes place. It may contain obstacles as well.
|
|
|
- The `Agents` element lists all agents that (will) appear in the simulation.
|
|
|
- The `Policies` element lists all so-called navigation policies that agents can use. Each agent uses one of the policies from this list. A policy defines most of the agent's behavior, so this is the key component of UMANS.
|
|
|
|
|
|
### Using separate sub-files
|
|
|
|
|
|
For the `World`, `Agents`, and `Policies` elements, you are allowed (but not obliged) to create *separate XML files* containing their details. This way, the overall XML file remains compact, and you can easily re-use environments / agent layouts / navigation behavior without having to copy and paste them.
|
|
|
|
|
|
For example, if you are using such 'sub-files' for all three elements, your main XML file will look like this:
|
|
|
|
|
|
```
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
<Simulation ...>
|
|
|
<World file="filenameWorld.xml"/>
|
|
|
<Agents file="filenameAgents.xml"/>
|
|
|
<Policies file="filenamePolicies.xml"/>
|
|
|
</Simulation>
|
|
|
```
|
|
|
|
|
|
where `filenameWorld.xml` etc. are the filenames of your sub-files, of course. Their location should be specified *relative* to the location of the main XML file.
|
|
|
|
|
|
A sub-file should always have `World`, `Agents`, or `Policies` as its main element, with the same contents (and possibly attributes) as in a regular XML scenario file.
|
|
|
|
|
|
Most of the examples in our [*examples*](https://gitlab.inria.fr/OCSR/UMANS/-/tree/master/examples) folder also use sub-files. For instance, the [*examples/agents*](https://gitlab.inria.fr/OCSR/UMANS/-/tree/master/examples/agents) folder contains agent layouts, and these are used by the main files in the [*examples*](https://gitlab.inria.fr/OCSR/UMANS/-/tree/master/examples) folder.
|
|
|
|
|
|
# 'Simulation' block
|
|
|
|
|
|
This section will be filled in soon.
|
|
|
|
|
|
# 'World' block
|
|
|
|
|
|
This section will be filled in soon.
|
|
|
|
|
|
# 'Agents' block
|
|
|
|
|
|
This section will be filled in soon.
|
|
|
|
|
|
# 'Policies' block
|
|
|
|
|
|
This section will be filled in soon. |