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?

1

There are 1 answers

3
Michael On

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.