Hello,
I am using a ghost vehicle to block a part of a lane by setting a custom length. However, at a certain set custom length, there is some weird behaviour by vehicles in the only other lane where they keep starting and stopping in a jerk-like motion. Not sure what exactly is causing this. I have attached a video to explain the problem. Pasting the relevant files here:
nodes.xml<nodes>
<node id="1" x="-500.0" y="0.0" type="priority"/>
<node id="2" x="+500.0" y="0.0" type="priority"/>
</nodes>
edges.xml
<edges>
<edge id="1f2" from="1" to="2" numLanes="2" />
</edges>
routes.rou.xml<routes>
<vType id="veh" length="5" />
<route id="r0" color="1,1,0" edges="1f2" />
<flow id="f" color="0,1,0" begin="0" end="300" vehsPerHour="10000" type="veh" route="r0" departLane="random" departSpeed="random" arrivalLane="random" />
</routes>
run.py (Python TraCI code):
step = 0
GHOST_POS = 750.0
END = 300.0
traci.vehicle.add(vehID='ghost', routeID='r0', typeID='veh', depart=0, departLane=0, departPos=GHOST_POS, departSpeed='random', arrivalLane='current', arrivalPos=GHOST_POS)
traci.vehicle.setColor(vehID='ghost',color=(255,0,0))
traci.vehicle.setLength(vehID='ghost',length=500) # 300m length has no issues
traci.vehicle.setStop(vehID='ghost', edgeID='1f2', pos=GHOST_POS, duration=10, until=END)
while step < END:
traci.simulationStep()
step+=1
traci.close()
The same simulation for a ghost vehicle of length 300 (m) poses no issues and the vehicles move forward as expected. Is this something to do with the total length of the edge/lane compared to that of the ghost vehicle?
Any clue/idea as to what may be causing this will really be appreciated!
Thank you.
Sincerely,
Hriday
_______________________________________________