Scenario file

From SIMA wiki
Revision as of 14:08, 18 December 2012 by Herret (talk | contribs) (Created page with "== 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 ex...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

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]


Optional Properties:

  • image[String]: path to a screenshot of the scenario

Entities

Entities... The property entitygroups.numentitygroups ...

Entity Groups

Each entity group gets an ID

  • 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]:
    • positions.0.pos_x [Integer]
    • 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.