Hi Mohit,
you can query the vehicles currently on a certain lane using
traci.lane.getLastStepVehicleIDs
<https://sumo.dlr.de/pydoc/traci._lane.html#LaneDomain-getLastStepVehicleIDs>
and then read the single vehicle speeds using traci.vehicle.getSpeed
<https://sumo.dlr.de/pydoc/traci._vehicle.html#VehicleDomain-getSpeed> .
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] Adding dedicated lanes
Datum: 2024-01-29T13:11:30+0100
Von: "Mohit Garg" <[email protected]>
An: "Mirko Barthauer" <[email protected]>
Hi Mirko,
I managed to add bike and pedestrian lane to my SUMO network. In my toy
network, I have only multiple edges with each edge having three lanes (a
seperate lane for car, bike and pedestrians each).
I want to retrieve average vehicle speed on each lane during simulation.
Which TraCI methods are required to retrieve overall edge speed and lane
speed for each vehicle separately?
Thanks in advance,
Kind regards,
Mohit
On Tue, 16 Jan, 2024, 07:48 Mirko Barthauer, <[email protected]
<mailto:[email protected]> > wrote:
Hi Mohit,
first things first: TraCI is intended for dynamic objects (something that
is likely to change during simulation). The network itself is regarded as
constant and only permissions can be changed.
Now there are some options how to edit the network automatically before
the simulation. It depends on how exactly you want to control the process
of adding lanes. You have the option to let netconvert infer lanes for
cyclists or pedestrians from the speed limits or existing lane permission
(see netconvert argument overview
<https://sumo.dlr.de/docs/netconvert.html#pedestrian> ). If you want to
edit the net with your own logic and in an automated fahsion, you should
look into the PlainXML <https://sumo.dlr.de/docs/Networks/PlainXML.html>
format. There you can define your network and convert back/forth to the
net.xml file using netconvert.
Best regards
Mirko
-----Original-Nachricht-----
Betreff: [sumo-user] Adding dedicated lanes
Datum: 2024-01-15T17:42:43+0100
Von: "Mohit Garg via sumo-user" <[email protected]
<mailto:[email protected]> >
An: "Sumo project User discussions" <[email protected]
<mailto:[email protected]> >
Hi there,
I am adding restricted lanes for bikes and pedestrians using netedit. But
I am doing it manually now, which is quite cumbersome in the case of a
large road network.
I am therefore wondering if there is a way to add lanes automatically
using TraCI in SUMO?
Thanks in advance,
Kind regards,
Mohit
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user