Hello,
I am using TraCI to build a network and to build traffic lights.
Now I want to create a TLS program in an additional file add.xml like this:
<additional>
<tlLogic id="12" programID="NW_Corner" offset="0" type="static">
<phase duration="180" state="ggggggg"/>
<phase duration="60" state="rrrrrrrr"/>
</tlLogic>
</additional>
After this I write in my python script this:
def run():
"""execute the TraCI control loop"""
traci.init(PORT)
step = 0
while traci.simulation.getMinExpectedNumber() > 0:
traci.simulationStep()
traci.trafficlights.setProgram("12", NW_Corner)
step += 1
traci.close()
sys.stdout.flush()
And this is what I write in my node.xml file:
<node id="12" x="+42.0" y="561.0" type="traffic_light" />
Now my problem: when I execute my python script and look into the net.xml file
this appears:
<tlLogic id="12" type="static" programID="0" offset="0">
<phase duration="31" state="Gr"/>
<phase duration="4" state="yr"/>
<phase duration="31" state="rG"/>
<phase duration="4" state="ry"/>
</tlLogic>
Why is my program not taken over?
Thanks,
Moritz
---------------------------------------------------------------
Moritz Schwarzkopf
BBT-71, Plant Structure Development Dadong
BMW Brilliance Automotive Ltd. / 华晨宝马汽车有限公司
Mobile : +86 155 2447 2481
Mail to / 邮箱:
[email protected]<mailto:[email protected]>
---------------------------------------------------------------
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user