Simulation/Public Transport
It is possible to define positions of bus stops and let vehicles ("busses") stop at these positions for a pre-given time. Definitions of bus stop locations in SUMO have the following format: <busStop id="<BUS_STOP_ID>" lane="<LANE_ID>" startPos="<STARTING_POSITION>" endPos="<ENDING_POSITION>" [line="<LINE_ID>[ <LINE_ID>]*"]/>. That means that a bus stop is an area on a lane. The parameters have the following meanings:
| Attribute Name | Value Type | Description |
|---|---|---|
| id | id (string) | The name of the bus stop; must be unique |
| lane | string-id | The name of the lane the busstop shall be located at |
| startPos | float | The begin position on the lane (the lower position on the lane) in meters |
| endPos | float | The end position on the lane (the higher position on the lane) in meters |
| line | string list | A list of names separated by spaces (' ') meant to be the names of the bus lines that stop at this bus stop. This is only used for visualisation purposes. |
Please note that bus stops must be added to a config via the --additional-files parameter
Vehicles must be informed that they must stop at a bus stop. The following example shows how this should be done (taken from <SUMO_HOME>/examples/sumo/busses):
<vtype id="BUS" accel="2.6" decel="4.5" sigma="0.5" length="15" maxspeed="70"
color="1,1,0"/>
<vehicle id="0" type="BUS" depart="0" color="1,1,0">
<route edges="2/0to2/1 2/1to1/1 1/1to1/2 1/2to0/2
0/2to0/1 0/1to0/0 0/0to1/0 1/0to2/0 2/0to2/1"/>
<stop busStop="busstop1" duration="20"/>
<stop busStop="busstop2" duration="20"/>
<stop busStop="busstop3" duration="20"/>
<stop busStop="busstop4" duration="20"/>
</vehicle>
What is defined here is a vehicle named "0" being a "BUS". "BUS" is a referenced type declared earlier. The vehicle has an embedded route (written by hand in this case) and a list of stop places. Each stop place is described by two attributes, "bus_stop" and "duration" where "bus_stop" is the name of the bus stop the vehicle shall halt at and "duration" is the time the vehicle shall wait at the bus stop in seconds. Please remark that the order of bus stops the vehicle shall halt at must be correct.
You may also let a vehicle stop at another position than a bus stop. The short definition of a vehicle's stop is: <stop bus_stop="<BUS_STOP_ID>" | ( lane="<LANE_ID>" endPos="<POSITION_AT_LANE>" ) duration="<HALTING_DURATION>"/>. This means you can either use a bus stop or a lane position to define where a vehicle has to stop. For a complete list of attributes for the "stop"-element of a vehicle see Specification#Stops.