Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Available functions

1. You can use inductionloop.getVehicleData to find vehicles that passed the detector in the last step (those that have a positive exit time)
2. You can use inductionloop.getIntervalVehicleNumber and getLastIntervalVehicleNumber. (also for e2)  However, this is not a rolling-horizon value but gives the data for periodic intervals. 
3. see https://sumo.dlr.de/docs/Simulation/Output/Traffic_Lights.html#coupled_lane_area_detectors, this should combine well with the above

4. you can make an e1 detector longer with attribute 'length' but not span multiple lanes. However, e2-detectors support consecutive lanes (https://sumo.dlr.de/docs/Simulation/Output/Lanearea_Detectors_%28E2%29.html#instantiating_within_the_simulation). If you need parallel lanes, use e3
5. trafficlight.setPhaseDuration(tlsID, 0)  - this only affects the current phase and not subsequent cycles.

regards,
Jakob


Am Do., 19. Dez. 2024 um 18:59 Uhr schrieb Andreas Lenhardt via sumo-user <sumo-user@xxxxxxxxxxx>:
Hello,

I have some questions regarding the traci api for my reinforcement learning project.
I need some functionalities for which I could not find suitable functions and which might be nice additions if they are not yet available.

  • I need the number of vehicles which have passed an e1/e2 (induction/lanearea) detector either
    1. in the last n seconds
    2. in the last simulation step
    3. in the last traffic light phase of the junction a detector belongs to
I know getLastStepVehicleNumber() exists, but this does not give me the number of vehicles which have actually passed a detector as far as I understand the docs correctly.
  • A multi-lane e1/e2 detector spanning over multiple lanes. F.e. one detector should measure the traffic flow on multiple junction-approaching lanes.
  • A function like "gotoNextPhase(tls_id) which switches a traffic light with a given id to its next phase.

I'd really appreciate any hints on how to implement these requirements :-)

Thanks in advance and kind regards
Andreas Lenhardt



--
Mit besten Grüßen
Andreas Lenhardt
_______________________________________________
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