Hi,
I am new to SUMO and I have tried fixing the route script but no matter what I do, the object vehicles change lanes. I am trying to run different scenarios where the ego vehicle either brakes and switches lanes or just directly switches lanes. But when the
ego vehicle approaches, the object vehicle switches lane and I want the object vehicles to strictly follow the lane which they are assigned to. Here is my route script. Please help. Need to get down with my research.
I have added notes in the script to help understand what am doing.
<routes>
<!-- Ego Vehicle (dynamic, can overtake) -->
<vType id="egoType"
accel="2.5" decel="4.5" sigma="0.3"
length="4.5" maxSpeed="16.7" color="1,0,0"
carFollowModel="Krauss" tau="1.4">
<param key="lcStrategic" value="0.6"/>
<param key="lcCooperative" value="0.4"/>
<param key="lcSpeedGain" value="0.3"/>
<param key="lcKeepRight" value="0.2"/>
<param key="lcOvertakeRight" value="0"/>
</vType>
<!-- Default Object Vehicle (mildly active) -->
<vType id="objType"
accel="1.0" decel="3.0" sigma="0.5"
length="4.5" maxSpeed="7.0" color="0,0,1"
carFollowModel="Krauss" tau="1.2">
<!-- Basic type for moving vehicles that may adapt but stay in lane -->
</vType>
<!-- Locked Object Vehicle (strictly no lane change) -->
<vType id="objLockedType"
accel="1.0" decel="3.0" sigma="0.5"
length="4.5" maxSpeed="7.0" color="0,0,1"
carFollowModel="Krauss" tau="1.2"
laneChangeModel="LC2013"
laneChangeMode="0"
maxSpeedLat="0.0001"
keepRight="0"
latAlignment="center">
<!-- Disable all forms of lateral logic -->
<param key="lcStrategic" value="0"/>
<param key="lcCooperative" value="0"/>
<param key="lcSpeedGain" value="0"/>
<param key="lcKeepRight" value="0"/>
<param key="lcOvertakeRight" value="0"/>
</vType>
<route id="r0" edges="edge0"/>
<!-- Slow Vehicle Ahead (same lane as ego) -->
<vehicle id="obj1" type="objType" route="r0"
depart="0" departLane="0" departPos="35"
departSpeed="7.0">
<!-- Reinforce lane lock for this one too -->
<param key="laneChangeMode" value="0"/>
<param key="maxSpeedLat" value="0.0001"/>
</vehicle>
<!-- Obstacle in Adjacent Lane (fully locked in lane 1) -->
<vehicle id="obj2" type="objLockedType" route="r0"
depart="0" departLane="1" departPos="100"
departSpeed="7.0">
<!-- Double reinforcement -->
<param key="laneChangeMode" value="0"/>
<param key="maxSpeedLat" value="0.0001"/>
<param key="keepRight" value="0"/>
<param key="latAlignment" value="center"/>
</vehicle>
<!-- Ego Vehicle (can decide overtaking strategy) -->
<vehicle id="ego" type="egoType" route="r0"
depart="2" departLane="0" departPos="0"
departSpeed="10.0">
<!-- Allow strategic and cooperative lane changes -->
<param key="laneChangeMode" value="1621"/>
</vehicle>
</routes>
|