相扑巴士站
Bus stops in SUMO
我最近开始使用 SUMO 1.5.0。我正在模拟一条简单的公交路线。我能够使用 reRouter 添加公交车站并让车辆在路线中循环。在公交车到达改道之前,公交车停在公交站,但在第二个环路或到达改道后,公交车不再停在公交站。你能帮我解决这个问题吗?
这是路线文件中附加文件和车辆停靠点定义的代码
<additional>
<rerouter id="Rerouter_0" edges="8" probablity="1">
<interval begin="0.00" end="3600.00">
<destProbReroute id="4"/>
</interval>
</rerouter>
<rerouter id="Rerouter_2" edges="4" probablity="1">
<interval begin="0.00" end="3600.00">
<destProbReroute id="8"/>
</interval>
</rerouter>
<busStop id="BusStop1" lane="3_0" startPos="45" endPos="55"/>
<busStop id="BusStop2" lane="7_0" startPos="45" endPos="55"/>
</additional>
<routes>
<route id="Route_1" edges="1 2 3 4 5 6 7 8"/>
<vType accel="1.1176" decel="0.89" id="Bus" length="14" maxSpeed="25" color="1,0,0"/>
<vType accel="3" decel="1.3" id="Car" length="5" maxSpeed="30" sigma="0.5" color="0,1,0"/>
<vehicle depart="0" id="Bus_1" route="Route_1" type="Bus">
<stop busStop="BusStop1" duration="10"/>
<stop busStop="BusStop2" duration="10"/>
</vehicle>
<vehicle depart="5" id="Bus_2" route="Route_1" type="Bus">
<stop busStop="BusStop1" duration="10"/>
<stop busStop="BusStop2" duration="10"/>
</vehicle>
<vehicle depart="10" id="Car_1" route="Route_1" type="Car"/>
<vehicle depart="15" id="Car_2" route="Route_1" type="Car"/>
<vehicle depart="20" id="Car_3" route="Route_1" type="Car"/>
<vehicle depart="25" id="Car_4" route="Route_1" type="Car"/>
</routes>
您需要让停靠点成为路线的一部分,而不是车辆的一部分,让改道者分配该路线,而不仅仅是选择新的目的地。
<additional>
<busStop id="BusStop1" lane="3_0" startPos="45" endPos="55"/>
<busStop id="BusStop2" lane="7_0" startPos="45" endPos="55"/>
<route id="reroute_0" edges="8 1 2 3 4">
<stop busStop="BusStop1" duration="10"/>
</route>
<route id="reroute_2" edges="4 5 6 7 8">
<stop busStop="BusStop2" duration="10"/>
</route>
<rerouter id="Rerouter_0" edges="8" probablity="1">
<interval begin="0.00" end="3600.00">
<routeProbReroute id="reroute_0"/>
</interval>
</rerouter>
<rerouter id="Rerouter_2" edges="4" probablity="1">
<interval begin="0.00" end="3600.00">
<routeProbReroute id="reroute_2"/>
</interval>
</rerouter>
</additional>
我最近开始使用 SUMO 1.5.0。我正在模拟一条简单的公交路线。我能够使用 reRouter 添加公交车站并让车辆在路线中循环。在公交车到达改道之前,公交车停在公交站,但在第二个环路或到达改道后,公交车不再停在公交站。你能帮我解决这个问题吗? 这是路线文件中附加文件和车辆停靠点定义的代码
<additional>
<rerouter id="Rerouter_0" edges="8" probablity="1">
<interval begin="0.00" end="3600.00">
<destProbReroute id="4"/>
</interval>
</rerouter>
<rerouter id="Rerouter_2" edges="4" probablity="1">
<interval begin="0.00" end="3600.00">
<destProbReroute id="8"/>
</interval>
</rerouter>
<busStop id="BusStop1" lane="3_0" startPos="45" endPos="55"/>
<busStop id="BusStop2" lane="7_0" startPos="45" endPos="55"/>
</additional>
<routes>
<route id="Route_1" edges="1 2 3 4 5 6 7 8"/>
<vType accel="1.1176" decel="0.89" id="Bus" length="14" maxSpeed="25" color="1,0,0"/>
<vType accel="3" decel="1.3" id="Car" length="5" maxSpeed="30" sigma="0.5" color="0,1,0"/>
<vehicle depart="0" id="Bus_1" route="Route_1" type="Bus">
<stop busStop="BusStop1" duration="10"/>
<stop busStop="BusStop2" duration="10"/>
</vehicle>
<vehicle depart="5" id="Bus_2" route="Route_1" type="Bus">
<stop busStop="BusStop1" duration="10"/>
<stop busStop="BusStop2" duration="10"/>
</vehicle>
<vehicle depart="10" id="Car_1" route="Route_1" type="Car"/>
<vehicle depart="15" id="Car_2" route="Route_1" type="Car"/>
<vehicle depart="20" id="Car_3" route="Route_1" type="Car"/>
<vehicle depart="25" id="Car_4" route="Route_1" type="Car"/>
</routes>
您需要让停靠点成为路线的一部分,而不是车辆的一部分,让改道者分配该路线,而不仅仅是选择新的目的地。
<additional>
<busStop id="BusStop1" lane="3_0" startPos="45" endPos="55"/>
<busStop id="BusStop2" lane="7_0" startPos="45" endPos="55"/>
<route id="reroute_0" edges="8 1 2 3 4">
<stop busStop="BusStop1" duration="10"/>
</route>
<route id="reroute_2" edges="4 5 6 7 8">
<stop busStop="BusStop2" duration="10"/>
</route>
<rerouter id="Rerouter_0" edges="8" probablity="1">
<interval begin="0.00" end="3600.00">
<routeProbReroute id="reroute_0"/>
</interval>
</rerouter>
<rerouter id="Rerouter_2" edges="4" probablity="1">
<interval begin="0.00" end="3600.00">
<routeProbReroute id="reroute_2"/>
</interval>
</rerouter>
</additional>