... | ... | @@ -169,7 +169,7 @@ In line with the I3D 2020 publication, a policy has two main ingredients: |
|
|
- one or more *cost functions* that assign a cost to the possible velocities that an agent can use,
|
|
|
- an *optimization method* that describes how to use these cost functions in the simulation.
|
|
|
|
|
|
In XML, cost functions are specified via one or more **child elements** named `CostFunction`. We will treat the `CostFunction` element in a separate section. The optimization method is specified via attributes, along with all other relevant parameters.
|
|
|
In XML, cost functions are specified via one or more **child elements** named `CostFunction`. We will treat the `CostFunction` element in a separate subsection below. The optimization method is specified via attributes, along with all other relevant parameters.
|
|
|
|
|
|
A `Policy` element has the following **main attributes**:
|
|
|
|
... | ... | @@ -197,3 +197,13 @@ Furthermore, a `Policy` element has the following **extra attributes** related t |
|
|
**Warning:** If an attribute is missing from the XML file, it will be replaced by a default value from this table if possible. After this replacement step, if any value is incorrect (such as a negative sampling angle), the policy will not be loaded, and therefore the simulation cannot start.
|
|
|
|
|
|
### 'CostFunction' element
|
|
|
|
|
|
A `CostFunction` element describes a single cost function to be used by a policy.
|
|
|
|
|
|
A `CostFunction` element has the following **main attributes**:
|
|
|
|
|
|
| Attribute name | Mandatory? | Type, constraints | Description | Default value |
|
|
|
| ------ | ------ | ------ | ------ | ------ |
|
|
|
| `name` | Yes | enum (see below for all options) | The name of the cost function to use. This name should correspond to one of the cost functions that exist in the UMANS source code. If the specified name could not be found, then the cost function cannot be loaded. | *none* |
|
|
|
| `coeff` | Yes | float | A scale factor for all costs and gradients that this cost function returns. This is useful if you are combining this cost function with others, or if you want to give the cost function a weaker or stronger gradient. | 1 |
|
|
|
| `range` | Yes | float, >= 0 | The interaction range of this cost function, in meters. Usually, this value is used as the distance for nearest-neighbor searches, so the cost function will only consider neighboring agents within `range` meters from the agent in question. However, it is possible that a cost function uses `range` for other purposes as well. | 5 | |
|
|
\ No newline at end of file |