Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Detect vehicles inside a junction

You can retrieve the ids of internal lanes by using sumolib in your traci script. Every connection object supports the call getViaLaneID().
Alternatively you can use traci.lane.getLinks() which includes the id of the target lane beyond the junction asĀ  well as the internal lane in its result.

regards,
Jakob

2018-08-03 18:58 GMT+02:00 Mirko Barthauer <m.barthauer@xxxxxxxxxxx>:

Hello all,

what would be the advised way of detecting vehicles which are inside a junction? I want to forbid some vehicles to enter a junction while others haven't left it yet.

  • One option would be to place detectors on internal lanes, which works OK if you collect the lane ID by hand.
  • Another would be to watch vehicles on incoming and outgoing lanes thoroughly to compare inflow and outflow.
I would still prefer some solution which involves less computational effort. Something like a new TraCI function junction.getLastStepVehicleNumber(fromLaneID, toLaneID)...? I would help with the implementation when the rough concept is set.

Regards
Mirko

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user



Back to the top