1

I have established a looped road with stops for buses to stop. Sadly, the buses only stop in the first lap and ignore the stops later on.

Here are the code relevant parts:

  1. Route xml file:

     <vType id="BUS" accel="2.6" decel="4.5" sigma="0" length="12" minGap="3" maxSpeed="70" color="1,1,0" guiShape="bus"/>
    
     <vehicle id="0" type="BUS" depart="0" color="1,1,0">
         <route edges="E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13 E14 E15 E16"/>
         <stop busStop="busStop_0" duration="20"/>
         <stop busStop="busStop_3" duration="20"/>
         <stop busStop="busStop_1" duration="20"/>
         <stop busStop="busStop_2" duration="20"/>
     </vehicle>
    
  2. The additional xml file:

<busStop id="busStop_0" lane="E2_0" startPos="7.53" endPos="17.53"/>
<busStop id="busStop_3" lane="E6_0" startPos="6.24" endPos="16.24"/>
<busStop id="busStop_1" lane="E11_0" startPos="8.47" endPos="18.47"/>
<busStop id="busStop_2" lane="E15_0" startPos="9.45" endPos="19.45"/>

<route id="route1" edges="E0 E1 E2 E3 E4">
  <stop busStop="busStop_0" duration="10"/>
</route>

<route id="route2" edges="E4 E5 E6 E7 E8">
  <stop busStop="busStop_3" duration="10"/>
</route>

<route id="route3" edges="E8 E9 E10 E11 E12">
  <stop busStop="busStop_1" duration="10"/>
</route>

<route id="route4" edges="E12 E13 E14 E15 E16 E0">
   <stop busStop="busStop_2" duration="10"/>
</route>


<rerouter id="rerouter_0" edges="E16">
   <interval end="1e9">
       <destProbReroute id="E0"/>
   </interval>
</rerouter>
<rerouter id="rerouter_1" edges="E0">
    <interval end="1e9">
       <destProbReroute id="E1"/>
    </interval>
</rerouter>
<rerouter id="rerouter_2" edges="E1">
    <interval end="1e9">
       <destProbReroute id="E16"/>
    </interval>
</rerouter>

Thank you in advance.

1 Answers1

0

You will need to use routeProbReroute instead of destProbReroute to assign the predefined route including the stop such as

<rerouter id="rerouter_1" edges="E0">
    <interval end="1e9">
       <routeProbReroute id="route1"/>
    </interval>
</rerouter>
Michael
  • 3,510
  • 1
  • 11
  • 23