Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] usage of the ~.setStop() method

Regarding to what you said, I defined my flow as following:
<vType id = "car1" vClass = "passenger" guiShape = "passenger" color = "red" length = "5.5" maxSpeed = "30" />
<flow id = "f1" type="car1"  begin="5" end= "900" departSpeed = "10" departLane = "0" arrivalLane = "0" number = "5"  from = "e1" to = "e3" />" 
Then I called the flow with this part of the code:
for veh_id in traci.vehicle.getIDList():
            length = traci.vehicle.getLength(veh_id)
            lane_id = traci.vehicle.getLaneIndex(veh_id)
            if length == 5.5 :
               traci.vehicle.setStop(veh_id, "e2",  laneIndex=0, flags = 0, duration = 10)
I expect vehicles to stop for 10 seconds and then continue their route but, they stop there till the end of the simulation making a queue. How can I fix this issue?
Ali

On Fri, Jan 28, 2022 at 3:51 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
Yes. The flow vehicles are numbered consecutively. If your flow is called 'xyz' you can call vehicle.setStop("xyz.23", ...) to stop the corresponding vehicle.


Am Fr., 28. Jan. 2022 um 10:02 Uhr schrieb ali mirzaei <alimrz222@xxxxxxxxx>:
Hi everyone,
Does the method " traci.vehicle.setstop()" can be applied for a flow of certain vehicles?
Best regards,
Ali
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top