Hi Mirko, Thank you for your reply! That's exactly my current implementation. Thanks anyway.
Sincerely, Shuyi On Wed, Jul 25, 2018 at 2:06 AM [email protected] < [email protected]> wrote: > There is no TraCI helper function for that, but all you need to calculate > it is available... > > > > If you check the phase ID at every second anyway, you can also keep track > of the elapsed time per traffic light/phase in your script. Just make some > counter which is reset to 0 when the current phase differs from the > previous time step. > > > > Regards > > Mirko > > > > > > > > -----Original-Nachricht----- > > Betreff: [sumo-user] Count elapsed time of a phase via TraCI > > Datum: 2018-07-25T09:25:14+0200 > > Von: "Shuyi Yin" <[email protected]> > > An: "[email protected]" <[email protected]> > > > > > > > Hi SUMO community, > > I'm controlling traffic lights via TraCI, and want to know at every second > what is my current phase and elapsed time of the phase. > > For the current phase, it is easy to use getPhase(juntion), but what about > the elapsed time, i.e. the number of seconds this current phase has been in > effect? > > Thanks, > Shuyi > > _______________________________________________ > sumo-user mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/sumo-user >
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
