I have defined bus routes for multiple lanes in SUMO, but I see that passengers can only enter and leave the buses in those bus stops. In my country buses are not always super organized and while they will stop at predefined bus stops, they will also stop when passenger rings a bell inside the bus or can board it by signaling the bus when they see it in the road. How can I model this in SUMO?
Asked
Active
Viewed 292 times
1 Answers
0
Busses (as every other vehicle) can stop everywhere. A busStop
element is basically just a shortcut for a definition of a lane and a position on the street. So instead of
<busStop id="busStop_gneE0_0_3" lane="gneE0_0" startPos="256.67" endPos="266.67"/>
<flow id="bus" from="gneE0" to="gneE0" begin="0" end="3600" period="600">
<stop busStop="busStop_gneE0_0_3" duration="10"/>
</flow>
you can also write
<flow id="bus" from="gneE0" to="gneE0" begin="0" end="3600" period="600">
<stop lane="gneE0_0" startPos="256.67" endPos="266.67" duration="10"/>
</flow>
with as many stops as you wish and persons will enter and leave at those stops if they are close enough. For the "real thing" you probably want to add stops dynamically while the simulation is running. You can use TraCI especially traci.vehicle.addStop for that.

Michael
- 3,510
- 1
- 11
- 23
-
Tried it and even though the bus stops at those places, and may wait there, no passengers get on or off the bus at those places, only if there is a proper busStop do they wait for it or get off the bus. – Daniel Uribe Jun 22 '21 at 19:38
-
Can you share your precise input files? Do the pedestrians wait at the correct location? – Michael Jun 27 '21 at 15:41
-
If I create an explicit bus stop, pedestrians wait for a bus and get off the bus at them without any problem, If I simply define a stop for the bus, pedestrians do not get on or off the bus in those stops. I am using intermodal routing for these persons. – Daniel Uribe Jul 12 '21 at 21:18