Tracks for Trains
To simulate different trains in the same simulation we need a flexible geometry. The track edge need to be a big wall, if there is no train. When a train arrives it must contain doors to the train and be again a big wall when the train leaves. And this needs to be done for every arriving train.
Here is an example, how it might look like:
ini-file:
<train_time_tables>
<train id="1" type="RE" room_id="1" track_x-start="0" track_y-start="0" track_x-end="300" track_y-end="0" time="5" >
<train id="2" type="ICE" room_id=„1“ track_x-start="0" track_y-start="0" track_x-end="300" track_y-end="0" time="300">
<train id="3" type="RB" room_id="1" track_x-start="0" track_y-start="0" track_x-end="300" track_y-end="0" time="900">
<\train_time_tables>
- RE, ICE etc. links to the external file of the train_types (see below), which contains the door information.
- track_x/y_start/end defines the track edge.
- time means the time when the train arrives the station and opens its doors.
train_types-file:
The train_types need to be translated into transitions (see below -> geometry-file)
<train_type = "RE" agents_max="600" xa="20" xe="220">
<door_id="1" x1="3" x2="5.5" door_frequency="2">
<door_id="2" x1="13" x2="15.5" door_frequency="3">
<door_id="3" x1="23" x2="25.5" door_frequency="2">
...
<\train_type>
<train_type = "ICE" agents_max="750">
<door_id="1" x1="3" x2="5.5" door_frequency="2">
<door_id="2" x1="13" x2="15.5" door_frequency="3">
<door_id="3" x1="23" x2="25.5" door_frequency="2">
...
<\train_type>
- agents_max is the maximum capacity of the train. When this number is reached, all doors will be closed.
- xa, xe are the start- and endpoint of the train relatively to the start point of the track.
- x1, x2 are the coordinates of the doors relatively to the start- and endpoints of the train.
- door_frequency [s] defines the time, which one agent needs to enter the train.
- door_id can be used to set transition_id.
Geometry-file
<transitions>
<transition id="101" caption="RE_1" type="train_door" room1_id="1" subroom1_id="1" room2_id="-1"
subroom2_id="-1" frequency"3">
<vertex px="90" py="87"/>
<vertex px="90" py="88.5"/>
</transition>
<\transitions>
- caption is a composition of "train_type" and "door_id".
- type="train_door" can be used to know that the agents exit the model with a train ans a frequency is needed for the doors.
- room_id1 from train_type (see above), subroom_id automatically by checking the coordinates of the track doors an the subrooms.
- frequency ist the door_frequency from train_type-file (see above).
Edited by Mohcine Chraibi