Open thinker310 opened 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?
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.
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.
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.