C3Fire

Unit Configuration

From C3LearningLabs


Units

The xml element Units defines all units that the players can control in a session.

<source>
<Units>
  <Unit> ... </Unit>
  <Unit> ... </Unit>
  ...
  <Unit> ... </Unit>
</Units>
</source>

The xml element Unit defines a unit in a session and contain a set of basic properties. Beside the basic properties the activated modules can add properties for the units. See documentation for each module.

A unit has the following basic properties:

Property

Value

IDName

The identification name. This name must be unique, only one unit can have a specific IDName.
The IDName is used to identify a unit in the mail communication between the roles, in the
managers observation tool etc.

The IDName is also used for the system to find the images representing the unit on the map. See
The Unit's Image.

Value example= "F1"

LongName

The long name is a describing name for a unit

Value example= "Firefighter Unit One"

Type

The type of the unit.

This text string has no meaning in the simulation, and can be selected freely by the
session designer.

Value example = "FireFighter" , "Water Unit"

SendInfoTo

The roles that should receive information from this unit. The unit sends information as, position,
state, things it see, etc.

Value example = "X,Y"

FireFighterUnit

If the unit should have the capability to fight fire.

Possible values = "True", "False" Value example= "true"

FireFighterMobilizeSpeed

The number of seconds it takes for the unit to prepare for fire fighting.

Value example= "3"

FireFighterFightingSpeed

The number of seconds it takes to close out a normal fire in one square.

Value example= "4"

FireFighterDeMobilizeSpeed

The number of seconds it takes for the unit to prepare for moving after it has closed a fire.

Value example= "3"

FireBreakUnit

If the unit should have the capability to create a fire break.

Possible values = "True", "False"

Module : FireBreak, read more

This feature is possible only if Your C3Fire has the module FireBreak
included and if you has set the property FireBreak in the element
FireFightingConfig to "true"C3system-config-session-unit-window-radius2-firebreak.gif


FireBreakCreateSpeed

The number of seconds it takes for the unit to create a fire break on one square.

Value example= "30"

FuelTankSize

The amount of fuel this unit can have.

Value example = "90"

Module : FuelLogistic
Value example= "30"

FuelLevel

The amount of fuel this unit contain at start of session.

Value example = "90"

Module : FuelLogistic
Value example= "10"

FuelLevelCountDownSpeed

The amount of fuel the unit counts down fuel level every second it is moving.

Value example = "1"

Module : FuelLogistic
Value example= "0.10"

FuelRefillSpeed

The amount of fuel the unit gain every second it is refilling fuel.

Value example = "10"

Module : FuelLogistic
Value example= "5"

FuelTankUnit

If the unit can supply fuel to other units.

Possible values = "True", "False"

Module : FuelLogistic

This is possible only if Your installed C3Fire have FuelLogistic included and FuelLogistic of FireFightingConfig is set to "true") Value example= "false"

MailSendTo

The mail addresses that this unit can send mail to.

Value example = "X,Y"

WindowRadius

The size of the visible area around the unit. The Unit see the fire states in this area. All
information outside this area is not visible for the unit. If an other unit or object are inside this
area, then it is visible for this unit.
The WindowRadius is, if wanted, visualised. This is done with the parameter WindowRadiusView.

Possible Value = "1", "2", "3"

1 : The area size is 1x1
2 : The area size is 3x3
3 : The area size is 5x5


The roles that are defined in the property SendInfoTo receive the information
viewed in the visible area. Value example= "2"C3-system-config-session-unit-window-radius1.gif

WindowRadiusView

If the visible area should be viewed on the map.

Possible values = "True", "False"

C3system-config-session-unit-window-radius1-true.gif C3system-config-session-unit-window-radius1-False.gif

WindowRadiusColor

The color of the viewed visible area.
The value should be a Hexa-Decimal based value as "#<Red><Green><Blue>"

Value example = "#555555"
Value example= "#303030" C3system-config-session-unit-window-radius1-color.gif

MovingSpeed

The number of seconds it takes for the unit to move one square.

Value example = "5"

WaterTankUnit

If the unit can supply water to other units.

Possible values = "True", "False"

Module : WaterLogistic

This is possible only if Your installed C3Fire have WaterLogistic included and WaterLogistic of
FireFightingConfig is set to "true")

WaterTankSize

The amount of water this unit can have.

Value example = "300"

Module : WaterLogistic

WaterLevel

The amount of water this unit contain at start of session.

Value example = "13"

Module : WaterLogistic

WaterLevelCountDownSpeed

The amount of water the unit counts down water level every second it is fighting a fire.

Value example = "5"

Module : WaterLogistic

WaterRefillSpeed

The amount of water the unit gain every second it is refilling water.

Value example = "10"

Module : WaterLogistic

CommandDelayTime

The delay time is the number of seconds from that a unit got a command from a user to the
moment when the unit starts to perform the command. When a unit got a commad the unit puts
the comman in its input command queue. There can exist a numbr of commands waiting to be
started in the command queue.

Value example = "10"

Module : Command Delay

This feature is possible only if Your C3Fire has the module CommandDelay included and if you
has set the property CommandDelay in the element UnitCommunicationConfig to "true" Value example= "0"

IntentionImageNrOfDistanceLevels

The number of images that represent the units intention. The Image will change depending on
how long time it takes for the unit to arrive to the intended position. The system can be configured
to have between one and five images.

Possible values = "1","2","3","4","5"

Example : If you have selected to have 5 images, then the following images are shown,
depending on how long time it will take for the unit to go from it's current position to it's intended,br. position.,br. Value example= "5"


C3system-config-session-unit-f1idl512.gif If time larger then 25 seconds. ( F1IDL512.gif )

C3system-config-session-unit-f1ild412.gif If time larger then 20 seconds. ( F1IDL412.gif )

C3system-config-session-unit-f1ild312.gif If time larger then 15 seconds. ( F1IDL312.gif )

C3system-config-session-unit-f1ild212.gif If time larger then 10 seconds. ( F1IDL212.gif )

C3system-config-session-unit-f1i12.gif Otherwise show the default image. ( F1I12.gif )

IntentionImageDistanceLevel2Time

If the time, in seconds, before the unit arrive to the intended position is larger than this value then
the Image DL2 is viewed.

Value example= "10"

IntentionImageDistanceLevel3Time

If the time, in seconds, before the unit arrive to the intended position is larger than this value then
the Image DL3 is viewed.

Value example= "15"

IntentionImageDistanceLevel4Time

If the time, in seconds, before the unit arrive to the intended position is larger than this value then
the Image DL4 is viewed.

Value example = "20"

IntentionImageDistanceLevel5Time

If the time, in seconds, before the unit arrive to the intended position is larger than this value then
the Image DL5 is viewed.

Value example= "25" />

<source>
<Unit      
  IDName = "F1"      
  LongName = "Firefighter Unit One"
  Type = "FireFighter"      
  SendInfoTo = "X"      
  Pos = "9,8"      
  MailSendTo = "X"      
  WindowRadius = "2"      
  WindowRadiusView = "true"
  WindowRadiusColor = "#303030"      
  MovingSpeed = "5"
  FireFighterUnit = "true"
  FireFighterMobilizeSpeed = "3"      
  FireFighterFightingSpeed = "4"
  FireFighterDeMobilizeSpeed = "3"
  FireBreakUnit = "true"    
  FireBreakCreateSpeed = "30"  
  FuelTankSize = "30"
  FuelLevel = "10"
  FuelLevelCountDownSpeed = "0.10"
  FuelRefillSpeed = "5"
  FuelTankUnit = "false"        
  WaterTankUnit = "false"
  WaterTankSize = "300"
  WaterLevel = "13"
  WaterLevelCountDownSpeed = "5"
  WaterRefillSpeed = "10"
  CommandDelayTime = "0"  
  IntentionImageNrOfDistanceLevels = "5" 
  IntentionImageDistanceLevel2Time = "10"
  IntentionImageDistanceLevel3Time = "15" 
  IntentionImageDistanceLevel4Time = "20"
  IntentionImageDistanceLevel5Time = "25" />
</source>


Unit Images

In the standard experiment setting, a unit is represented on the map by four images:
The intention (Where the unit is moving towards) is a white number.
The unit position is viewed with a colored number.


Units position : F1 Position

Units position selected : F1 Position Selected

Units intention : F1 Intention

Units intention selected : F1 Intention Selected

C3system-config-session-unit-window-image-mappanel.gif
PositionandIntention
on the map

These images can be changed by the session designer. The images should be stored in the directory <C3FIRE-MAP-IMAGES> Example:
C:\c3fire\www\pic\.

The images also need to be named according to a predefined pattern.

Example For Unit " F1 " the names are:

The name of the image representing the units position is " F1P12.gif " .
The name of the image representing the units position selected is " F1PS12.gif " .
The name of the image representing the units intention is " F1I12.gif " .
The name of the image representing the units intention selected is " F1IS12.gif " .
The name is a combination of three parts:

First : The units configured IDName " F1 ".
Second : "P" for position; "PS" for position selected; "I" for intention; "IS" for intention selected.
Third : The suffix " 12.gif " as the image must be a gif image.


When switching pictures every single unit is represented by four images. Their names are:

Units IDName and " P12.gif " .
Units IDName and " PS12.gif " .
Units IDName and " I12.gif " .
Units IDName and " IS12.gif " .

Units Positions

The xml element UnitsPos defines all units start position on the map.

<source>
<UnitsPos>
  <Unit> ... </Unit>
  <Unit> ... </Unit>
  ...
  <Unit> ... </Unit>
</UnitsPos>
</source>

The xml element Unit defines a unit in a session and contain the ID Name and the position.

A unit has the following basic properties:

Property

Value

IDName

The identification name. This name must be unique, only one unit can have a specific IDName.
The IDName is used to identify a unit in the mail communication between the roles, in the
managers observation tool etc.

The IDName is also used for the system to find the images representing the unit on the map. See
The Unit's Image.

Value example= "F1"

Pos

The start location on the map.
X, Y or (Col,row) on the map.

Value example = "9,8"

<source>
<Unit      
  IDName = "F1"      
  Pos = "9,8"      
/>
</source>

Unit Communication Config

Defines the comunication properties between roles and units.

The unit communication is defined with the following properties :

<UnitCommunicationConfig
CommandDelay = "true" />

Property

Value

CommandDelay

If the module CommandDelay should be activated.

Possible values = "True", "False"

Module : CommandDelay

For more information about the module see CommandDelay.
This feature is possible only if Your C3Fire distribution has the module CommandDelay included.

Value example= "bottle-open.wav"


Unit Movement Config

Defines the movment properties for the units.

The unit movement is defined with the following properties :

Property

Value

FuelLogistic

If fuel logistic should be included in the session. If true then module is included.

Possible values = "True", "False"

Module : FuelLogistic

For more information about the module see FuelLogistic.
This feature is possible only if Your C3Fire distribution has the module FuelLogistic included.

FuelRefillOnPosType

Defines refilling-fuel position constraints between a unit that wants fuel and a fuel refilling unit.

Possible values :
"FuelRefillOnSamePos", "FuelRefillOnNESWPos"
Default are "FuelRefillOnNESWPos"

FuelRefillOnSamePos
The fuel refilling process can start if the units are on the same pos on the map.

FuelRefillOnNESWPos
The fuel refilling process can start if the unit that wants fuel is one square left, right, over or under the fuel
refilling unit. The unit should stand on square North, East, South or West of the other unit. (On NESW Pos).

If the unit that wants fuel is on pos (x,y).
Then possible positions for the fuel refilling unit are :
(x-1,y), (x+1,y), (x,y-1) or (x,y+1)
Not possible positions are :
(x,y), (x-1,y-1), (x+1,y+1), (x+1,y-1), (x-1,y+1)

<Source>
 <UnitMovementConfig
  FuelLogistic = "true"
  FuelRefillOnPosType = "FuelRefillOnNESWPos"/>
</Source>


Unit Info Display

Defines the information about units that is exposed in the user interface for the roles. Defines both the outlined information and the detailed
information about units. Some examples of a UnitInfoDisplay configuration, read more.

Configuration examples

<source>
 <UnitInfoDisplay>   
  <UnitInfoDisplayOutline 
    Name = "Ground Chief" >
    <UnitInfoDisplayOutlineCol Property = "IDName"     
                               PropertyType = "String" width = "30" />
    <UnitInfoDisplayOutlineCol Property = "Pos"        
                               PropertyType = "String" width = "40" />
    <UnitInfoDisplayOutlineCol Property = "Intention"  
                               PropertyType = "String" width = "50" />
    <UnitInfoDisplayOutlineCol Property = "Activity"   
                               PropertyType = "String" width = "70" />    
    <UnitInfoDisplayOutlineCol Property = "WaterLevel" 
                               PropertyType = "String" width = "50" /> 
    <UnitInfoDisplayOutlineCol Property = "FuelLevel"  
                               PropertyType = "String" width = "50" />
    <UnitInfoDisplayOutlineRow UnitIDName = "F1" 
                               UnitInfoDisplayDetail = "FireFighter"/>
    <UnitInfoDisplayOutlineRow UnitIDName = "F2" 
                               UnitInfoDisplayDetail = "FireFighter"/>
    <UnitInfoDisplayOutlineRow UnitIDName = "F3" 
                               UnitInfoDisplayDetail = "FireFighter"/>
    <UnitInfoDisplayOutlineRow UnitIDName = "F4" 
                               UnitInfoDisplayDetail = "FireFighter"/>  
    <UnitInfoDisplayOutlineRow UnitIDName = "W5" 
                               UnitInfoDisplayDetail = "WaterTruck"/> 
    <UnitInfoDisplayOutlineRow UnitIDName = "G6" 
                               UnitInfoDisplayDetail = "FuelTruck"/>
  </UnitInfoDisplayOutline>
      
  ...
     
  <UnitInfoDisplayDetail 
    Name = "FireFighter" 
    PropertyColWidth = "170" 
    ValueColWidth = "140">
    <UnitInfoDisplayDetailRow Property = "IDName"             
                              DisplayType = "String"/>
    <UnitInfoDisplayDetailRow Property = "Type"               
                              DisplayType = "String"/>
    <UnitInfoDisplayDetailRow Property = "Pos"                
                              DisplayType = "String"/>
    <UnitInfoDisplayDetailRow Property = "Intention"          
                              DisplayType = "String"/>
    <UnitInfoDisplayDetailRow Property = "Activity"           
                              DisplayType = "String"/>
    <UnitInfoDisplayDetailRow Property = "MovingSpeed"        
                              DisplayType = "Number"/>
    <UnitInfoDisplayDetailRow Property = "MobilizingSpeed"    
                              DisplayType = "Number"/>
    <UnitInfoDisplayDetailRow Property = "FireFightingSpeed"  
                              DisplayType = "Number"/>
    <UnitInfoDisplayDetailRow Property = "DeMobilizingSpeed"  
                              DisplayType = "Number"/> 
    <UnitInfoDisplayDetailRow Property = "WaterTankSize"      
                              DisplayType = "Number"/>
    <UnitInfoDisplayDetailRow Property = "WaterLevel"         
                              DisplayType = "Number"/>
    <UnitInfoDisplayDetailRow Property = "FuelTankSize"       
                              DisplayType = "Number"/>
    <UnitInfoDisplayDetailRow Property = "FuelLevel"          
                              DisplayType = "Number"/>    
  </UnitInfoDisplayDetail>     
    
</UnitInfoDisplay> 
</Source>


UnitInfoDisplayOutline

Defines the UnitInfoDisplayOutline information about units, read more.

Property

Value

Name

The identification name of the UnitInfoDisplayOutline.

Value example = "Ground Chief"


UnitInfoDisplayOutlineCol

Defines the columns of UnitInfoDisplayOutline table, read more.

Property

Value

Property

The property of the column.

Value examples = "IDName", "Pos", "Intention"

Possible values are IDName, Pos, Intention, Activity, CommandQueue, CommandDelayTime, FireBreakCreateSpeed,
LongName, Type, SendInfoTo, WaterLevel, WaterTankSize, FuelLevel, FuelTankSize, MovingSpeed, MobilizingSpeed,
FireFightingSpeed and DeMobilizingSpeed.

PropertyType

The type of information the column will handle.

Value example = "String"

Width

The width of the column.

Value example = "50"


UnitInfoDisplayOutlineRow

Specifies wich units information shall be exposed in the rows of UnitInfoDisplayOutline table and also wich UnitInfoDisplayDetail should be
connected to that row of information, read more.

Property

Value

UnitIDName

The IDname of the unit whos information is exposed in this table row.

Value example = "F1"

UnitInfoDisplayDetail

The UnitInfoDisplayDetail that is connected to this row of information.

Value example = "FireFighter"


UnitInfoDisplayDetail

Defines the UnitInfoDisplayDetail information about units, read more.

Property

Value

Name

The identification name of the UnitInfoDisplayDetail.

Value example = "Ground Chief"

PropertyColWidth

The width of property column.

Value example = "60"

ValueColWidth

The width of value column.

Value example = "60"


UnitInfoDisplayDetailRow

Defines the rows of UnitInfoDisplayDetail table, read more.

Property

Value

Property

The property of the row.

Value examples = "IDName", "Pos", "Intention"

Possible values are IDName, Pos, Intention, Activity, CommandQueue, CommandDelayTime, FireBreakCreateSpeed,
LongName, Type, SendInfoTo, WaterLevel, WaterTankSize, FuelLevel, FuelTankSize, MovingSpeed, MobilizingSpeed,
FireFightingSpeed and DeMobilizingSpeed.

DisplayType

The type of information the row will handle.

Value example = "String"