Scenario file
Contents
Creation of a Scenario
Each Scenario displayed in the scenario list of the scenario selector is based on a property file located in “sim/config/scenarios”. For an example you can look at the file “tutorial.properties".
The scenario files are used to configure the simulated world. This includes properties of agents and their decision units. You can configure any properties that are listed in a class under
public static clsProperties getDefaultProperties(String poPrefix)
TODO: welchen property-Namen soll man in den config-file angeben? 1:1 den in der Klasse angegeben (zb P_DATABASE_SOURCE)
Structure of a Property Line
[Key] ‘:’ | ’=’[Associated element]
e.g.: field_height=200.0 ; field_height:200.0
Scenario Properties
Each scenario file must include a set of properties which describes the simulation environment.
Mandatory properties:
- title [String]: The title will be shown in the shortlist of the scenario selector
- short_ description [String]
- description [String]
- field_height [real]
- field_width [real]
- worldboundarywalls [Boolean]: If true a wall around the world will be added
- usedefaults [Boolean] : Highly recommended to set it to true. If false no default properties will be loaded
- loader_type[String]: use SIMPLE_PROPERTY_LOADER
- loader_version[String] use 3
Optional Properties:
- image[String]: path to a screenshot of the scenario
Add Entities
Entities are summarized in entity groups. Each entity within a group has the same properties (except the position).
Entity Groups
Each entity group gets an ID
e.g.: entitygroups.0.
- groupentitytype[String]: Defines the type of the entities of this group
- groupdecisionunittype [String]:Defines the decision unit type
- numentities [Integer]:the number of entities in this group
- positions.positiontype [String]: RANDOM | LIST
- RANDOM: the entities will be placed randomly
- LIST: you have to define positions for each entity
- positions - used if position.positiontyp= LIST
- positions.0.pos_angle [Real]: orientation in radiant
- positions.0.pos_x [Integer]: position (top-left is (0/0))
- positions.0.pos_y [Integer]
Change Default Properties
It is possible to change the default properties of an entity of decision unit by adding on of the following keywords.
- overwriteentitydefaults
- removeentitydefaults
- overwritedecisionunitdefaults
- removedecisionunitdefaults
e.g.: entitygroups.1.overwriteentitydefaults.shape.shape_fresh.image_path=/World/src/resources/images/carrot_grayscale.png
changes the property “shape.shape_fresh.image_path” of entity group 1.