eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.57k stars 1.44k forks source link

GLOSA: permit external prediction of dynamic traffic signal switch time. #12251

Open thinker310 opened 1 year ago

thinker310 commented 1 year ago

Hi, the traffic signal timing strategy is the base for GLOSA, so I think a traci funtion that can tell the signal timing to glosa device can be developed in th future. Then GLOSA can adjust the vehicle speed according to the signal timing information set by traci.

namdre commented 1 year ago

the whole signal plan is already available via TraCI. Or are you talking about a convenience function to replicate https://github.com/eclipse/sumo/blob/f80104bf5c08735079334073a9aa4ccfb0dedbcf/src/microsim/devices/MSDevice_GLOSA.cpp#L186?

thinker310 commented 1 year ago

I mean that TraCI can only obtain the fixed signal plan, when I develop a adaptive signal plan algorithm, I want to tell GLOSA my signal plan then GLOSA adjust cars speed according to my signal plan. So GLOSA need provide an TraCI api to let me tell GLOSA some information.

namdre commented 1 year ago

I think I understand your requirement now. A workaround to achieve this with the current code would be to replace the whole program via traci.trafficlight.setProgramLogic (with a custom static program that reflects the predicted timings for the upcoming phases). Then the GLOSA device would correctly compute your predicted timeToSwitch.