Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Problem in defning traffic light schedules

Hello,
Basically what you defined should work. However:

1) WAUT-definitions are only useful if each program runs for more than one
cycle.
If all cycles are distinct you can just put all the phases into a single
long program that covers the whole simulation period.

2) If you use WAUTS and all traffic lights switch their signal plans at the
same time, then you can also re-use programIDs among the different traffic
lights and accomplish the same with less <wautSwitch> definitions.

regards,
Jakob

2017-09-13 22:00 GMT+02:00 Aboozar Roosta via sumo-user <
sumo-user@xxxxxxxxxxxxxxxxxxxxx>:

> Sorry, seems like my file is not sent completely. Here I attach it again:
>
>
>
> *Aboozar Roosta*
> Msc. Student of Electrical Engineering - Control
> School of Electrical and Computer Engineering,
> Tarbiat Modares University (TMU), Tehran, Iran.
> 2017
>
> On Thu, Sep 14, 2017 at 12:27 AM, Aboozar Roosta <roosta.aboozar@xxxxxxxxx
> >
> wrote:
>
> > Hi all,
> > I have a simulation scenario with two traffic lights. I want to modify
> the
> > green and red times for each cycle of the two traffic lights. I've
> written
> > an additional file to do that:
> >
> > <additional>
> >     <edgeData id="1" type="emissions" freq="90" file="emi_edge.xml"/>
> >     <edgeData id="2" freq="90" file="edge_dump.xml"/>
> >     <tlLogic id="10" type="static" programID="S1" offset="0">
> >         <phase duration="45.000000" state="rrrrGGggrrrrGGg"/>
> >         <phase duration="45.000000" state="GGggrrrrGGggrrr"/>
> >     </tlLogic>
> >     <tlLogic id="10" type="static" programID="S2" offset="0">
> >         <phase duration="45.000000" state="rrrrGGggrrrrGGg"/>
> >         <phase duration="45.000000" state="GGggrrrrGGggrrr"/>
> >     </tlLogic>
> >     <tlLogic id="10" type="static" programID="S3" offset="0">
> >         <phase duration="45.000000" state="rrrrGGggrrrrGGg"/>
> >         <phase duration="45.000000" state="GGggrrrrGGggrrr"/>
> >     </tlLogic>
> >
> > ....
> >
> >     <tlLogic id="11" type="static" programID="P1" offset="0">
> >         <phase duration="45.000000" state="GGggrrrrGGggrrrr"/>
> >         <phase duration="45.000000" state="rrrrGGggrrrrGGg"/>
> >     </tlLogic>
> >     <tlLogic id="11" type="static" programID="P2" offset="0">
> >         <phase duration="45.000000" state="GGggrrrrGGggrrrr"/>
> >         <phase duration="45.000000" state="rrrrGGggrrrrGGg"/>
> >     </tlLogic>
> > ....
> >
> > <WAUT startProg="0" refTime="0" id="w1">
> >         <wautSwitch to="S1" time="90"></wautSwitch>
> >         <wautSwitch to="S2" time="180"></wautSwitch>
> >         <wautSwitch to="S3" time="270"></wautSwitch>
> >         <wautSwitch to="S4" time="360"></wautSwitch>
> >         <wautSwitch to="S5" time="450"></wautSwitch>
> >         <wautSwitch to="S6" time="540"></wautSwitch>
> >         <wautSwitch to="S7" time="630"></wautSwitch>
> >         <wautSwitch to="S8" time="720"></wautSwitch>
> >         <wautSwitch to="S9" time="810"></wautSwitch>
> >         <wautSwitch to="S10" time="900"></wautSwitch>
> >         <wautSwitch to="S11" time="990"></wautSwitch>
> >         <wautSwitch to="S12" time="1080"></wautSwitch>
> >         <wautSwitch to="S13" time="1170"></wautSwitch>
> >         <wautSwitch to="S14" time="1260"></wautSwitch>
> >         <wautSwitch to="S15" time="1350"></wautSwitch>
> >         <wautSwitch to="P1" time="90"></wautSwitch>
> >         <wautSwitch to="P2" time="180"></wautSwitch>
> >         <wautSwitch to="P3" time="270"></wautSwitch>
> >         <wautSwitch to="P4" time="360"></wautSwitch>
> >         <wautSwitch to="P5" time="450"></wautSwitch>
> >         <wautSwitch to="P6" time="540"></wautSwitch>
> >         <wautSwitch to="P7" time="630"></wautSwitch>
> >         <wautSwitch to="P8" time="720"></wautSwitch>
> >         <wautSwitch to="P9" time="810"></wautSwitch>
> >         <wautSwitch to="P10" time="900"></wautSwitch>
> >         <wautSwitch to="P11" time="990"></wautSwitch>
> >         <wautSwitch to="P12" time="1080"></wautSwitch>
> >         <wautSwitch to="P13" time="1170"></wautSwitch>
> >         <wautSwitch to="P14" time="1260"></wautSwitch>
> >         <wautSwitch to="P15" time="1350"></wautSwitch>
> >     </WAUT>
> > </additional>
> >
> > ​I've omitted some lines here which are repetitive(the complete
> additional
> > file is attached).​
> >
> >
> >
> >
> >
> > *​ Have I written the code correctly? Is that how one would control two
> or
> > more traffic lights with a single additional file? Please advise me how
> to
> > control many traffic lights from additional files. Thanks a lot.​*
> > Aboozar Roosta
> > Msc. Student of Electrical Engineering - Control
> > School of Electrical and Computer Engineering,
> > Tarbiat Modares University (TMU), Tehran, Iran.
> > 2017
> >
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/sumo-user
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sumo-user

Back to the top