Dear Jakob,

 

Thank you for your reply. I have thought about define all possible phases in 
advance, but there are way too many possibilities (approx. 1500 combinations). 
The only I can think is to define all possible phase orders, but change phase 
duration only instead of change both phase order and duration.

 

In my case, there are two intersections which are next to each other. In order 
to achieve dynamic split and offset control, I update both phase duration and 
phase orders every signal cycle. Both intersections may start with the same 
settings as follow:

<tlLogic id="…" type="static" programID="0" offset="0">

<phase duration="5" state="yyuu"/>

<phase duration="30" state="rrGG"/>

<phase duration="5" state="uuyy"/>

<phase duration="30" state="GGrr"/>

</tlLogic>

By the end of a cycle, say I want to change the second intersections offset to 
10s (phase”rrGG” will start 10s later). So the setting I will have is:

<phase duration="10" state="GGrr"/>

<phase duration="5" state="yyuu"/>

<phase duration="30" state="rrGG"/>

<phase duration="5" state="uuyy"/>

<phase duration="20" state="GGrr"/>

This is what I was trying to do.

 

I coded my program in the following orders:

1.       SimulationStep() % initialise the first simulation step, I found if I 
define traffic light setting before the first time step, defined settings will 
not be applied.

2.       setCompleteRedYellowGreenDefinition(…)

3.       setPhaseDuration(…) % to update the value in getNextSwitch, otherwise, 
the first phase will not have the same duration as defined.

4.       When t = 71s (the cycle time is 70s), redo 
setCompleteRedYellowGreenDefinition(…) and setPhaseDuration(…). If did when 
t=70s, the settings will be implemented correctly as well.

 

Thank you in advance.

 

Kind Regards,

Rui

 

From: Jakob Erdmann [mailto:[email protected]] 
Sent: 05 April 2016 09:11
To: [email protected]
Cc: sumo-user
Subject: Re: [sumo-user] update traffic signal via TraCi

 

Hello,

It would help if you could define a *minimal* example of what you try to 
accomplish and how various control approaches fail to perform as expected from 
the documentation.

Personally I tend to define all possible phases in advance and then control the 
cycle via the traci.trafficlights.setPhase.

It helps to set a high duration (1000s) for some of the pre-defined phases to 
avoid premature switching.

For phases that always follow each other without variation, I use SUMOs native 
switching.

regards,

Jakob

 

 

2016-04-04 14:19 GMT+02:00 <[email protected]>:

Hello,



I am using SUMO 0.25.0 and trying to change the traffic signal plans for
every signal cycle.



I have been using traci.trafficlights.setCompleteRedYellowGreenDefinition to
define the new timing plans for the next cycle. I update the duration of
phases and increase the number of phases of a cycle when needed. However, I
have noticed that traffic lights in SUMO simulation do not always perform
the way I defined. Sometimes, the status (green,red and yellow) and the
duration of phase can be wrong.



I did some tests by myself, and found the right time to use function
setCompleteRedYellowGreenDefinition is at the first time step when the new
cycle starts instead of the last time step of the current cycle. At the same
time, I have to use function setPhaseDuration for the first phase of the new
cycle to update the result in function getNextSwitch. But all of what I
tried still cannot guarantee SUMO to implement the traffic signal plans I
defined.



I hope can have some advices for this situation, and please correct me if
what I said is incorrect.



Many thanks,

Rui





------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

 

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to