Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Adding dedicated lanes

Hi Mohit,

 

you can query the vehicles currently on a certain lane using traci.lane.getLastStepVehicleIDs and then read the single vehicle speeds using traci.vehicle.getSpeed.

 

Best regards

Mirko

 

 

 

 

-----Original-Nachricht-----

Betreff: Re: [sumo-user] Adding dedicated lanes

Datum: 2024-01-29T13:11:30+0100

Von: "Mohit Garg" <mgarg@xxxxxx>

An: "Mirko Barthauer" <m.barthauer@xxxxxxxxxxx>

 

 

 

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, <m.barthauer@xxxxxxxxxxx> 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). If you want to edit the net with your own logic and in an automated fahsion, you should look into the PlainXML 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" <sumo-user@xxxxxxxxxxx>

An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>

 

 

 

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

 

 



Back to the top