Hello, you can get the complete program using traci.trafficlights.getCompleteRedYellowGreenDefinition(tlsID) see method _readLogics and classes Phase and Logic in tools/traci/trafficlights.py for details. Also, when modifying the logic dynamically it is usually easiert to only set the current phase instead of replacing the whole program. see http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights regards, Jakob
2015-03-03 7:14 GMT+01:00 Shailendrasinh Chauhan < [email protected]>: > hello, > I want to make Traffic Light Dynamic. I am using TraCI. Below is my > tlLogic, I want to fetch all durations to sum up them for getting total > duration of perticular tlLogic. How can I get them? > > <tlLogic id="5/6" type="static" programID="0" offset="0"> > <phase duration="31" state="GGGGggrrrrGGGGGGggrrrr"/> > <phase duration="7" state="yyyyggrrrryyyyyyggrrrr"/> > <phase duration="6" state="rrrrGGrrrrrrrrrrGGrrrr"/> > <phase duration="7" state="rrrryyrrrrrrrrrryyrrrr"/> > <phase duration="31" state="rrrrrrGGggrrrrrrrrGGgg"/> > <phase duration="7" state="rrrrrryyggrrrrrrrryygg"/> > <phase duration="6" state="rrrrrrrrGGrrrrrrrrrrGG"/> > <phase duration="7" state="rrrrrrrryyrrrrrrrrrryy"/> > </tlLogic> > > I also want to change tlLogic run time to make Traffic Light dynamic. How > can I define new tlLogic with new durations and new states run time? > > Than you in advance... > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
