DESIGN THE SWITCHING PERIOD FOR TRAFFIC LIGHT.docx
《DESIGN THE SWITCHING PERIOD FOR TRAFFIC LIGHT.docx》由会员分享,可在线阅读,更多相关《DESIGN THE SWITCHING PERIOD FOR TRAFFIC LIGHT.docx(15页珍藏版)》请在冰豆网上搜索。
DESIGNTHESWITCHINGPERIODFORTRAFFICLIGHT
DESIGNTHESWITCHINGPERIODFORTRAFFICLIGHT
Abstract
Thisisaproblemaboutthecapacityofthetrafficlightsintheintersection. Wefirstlydividedonehourinto 360 periodsoflength 10s. thenumberofthecarsarrivedattheintersectionisassumedtobeinPoissondistribution,andthevaluewithinagivenrange.WecangeneratearandomnumberinPoissondistributiontosimulatethenumberofthecarsarrived. Inaddition,weusetheconceptofquantityofflowtoanalogyarrivalandpassingcars,introductingtheconceptofstrandedcarsatthestartofeveryperiod.Itisthenumberofcarsstrandedonthestartofthelastperiodplusthenumberofcarsarrivedanddeductingthenumberofcarspassedinthelastperiod. Ineachperiod,whenthesumofthenumberofvehiclesstrandedandthenumberofvehiclesarrivingarefewerthanthecapacity,theyallcanpass.Whenmorethanthecapacity,only36carsper10seccanpasswhiletherestwillhavetowaitforthenextperiod. Thuswemakethemodeltosimulatethenumberofcarsstuckinacycle,thenumberofcarsarrived,aswellasthenumberofcarspassedineachperiod,thentheproblemcanbesolved.
Fortheproblemone,bythecumulativenumberofcarspassedduringeachperiod,wecanget thenumberofthepassedcarinonehouris3364inthedirection1.
Astothesecondprobleminvolvingthewaitingtime.Basedontheoriginalmodel,weintroducetheconceptofthetimeofthecarsarrivedineveryperiodneedtowait.Thatisalsothetimefortheretentedcarstopassthroughtheintersection.Wecanobtaintheaveragewaitingtimewhenintheredlightis 43sbyaveragingthesumofwaitingtimeineachperiod.Comparethewaitingtimeineachperiod,wecangetthemaximumwaitingtime70s.
Forthethirdissues,weassumethatallthecarsareofthesamelength,thevehicleisalsoequallyspacedwhenstopped. Soweconvertedthequeuelengthforthesakeofthenumberofcarsstranded. Accordingtothepreviousmodelestablished,wehavealreadygottheaveragenumberofcarsstrandedandthemaximumnumberofstrandedvehiclesbycomparingthenumberineachperiod.Theresultsisthattheaveragequeuelengthis 198mwhilethemaximumqueuelengthis 480m.
Tothefourthquestion,becausethecarcanonlythroughtheintersectionwheninthegreenlight,theaveragenumberofcarspassingthroughtheintersectionduringthetimewhenthetrafficlightisgreenisequaltothetotalnumberofcarspassingthroughtheintersectiondividedbythenumberofgreenlightcyclewithinonehourperiod,approximately 93.
Asforthefifthproblem,substantially,thedirectionforthecarsinthedirection2isthesamewiththatinthedirection1, thedifferenceisthetimeofgreenlightis30secinthedirection1withthe 70s redlight.Bycontrastthetimeofgreenlightinthedirection2is70s,whiletheredlighttakes30s . Inaddition,thedirection2has anumberofthecarsneedtopassthrough,whilethegreenlightownsasmallercapacity.Soweneedtaketheconditonthattherewillhavethecarsstrandedintheintersectionafteragreenlightcycleintotheconsideration.Weshouldanalysethewaitingtimeandthequeuelengthofthestrandedcarsinanotherway.Theresultsoftheprogrammingisthatthereare 5039 carsinthedirection2passthroughtheintersectionwithinonehour.Whenstoppedintheredlight,theaveragewaitingtimeforacaris 108s, themaximumwaitingtimeis141s. Theaveragequeuelengthis282mwhilethemaximumqueuelengthis834m. Wheningreenlight,theaveragenumberofthecarspassedthroughtheintersectionis 140,upto 140 ,themostcarscancross.
Thefinalproblem,weallowthetimeofthegreenlightinthedirection1changingbythestepina certainrange,togetthedifferenttotalwaitingtime.Andthenwefindtheapproximategreentimemakingtheshortestwaitingtime.Whentakingintoaccountthedirection2,weusethesameway.Thenweshouldaccumulatethetotalwaitingtimeinbothdirections,andchoosethetimeofgreenlightmakingthewaitingtimeshortestis28s.
Keywords:
trafficlightcycle,vehicle,waitingtime
1.Introduction
Nowadaysthetrafficjamstravelproblemsisveryserious,howtodesignatrafficlightconversioncycletomakethecartheshortestwaitingtimeandqueuelengthisaveryimportantissue.
Consideranintersectionoftwoone-waystreetscontrolledbyatrafficlight.Assumethatbetween5and15cars(varyingprobabilistically)arriveattheintersectionevery10secindirection1,andthatbetween6and24carsarriveevery10secgoingindirection2.Supposethat36carsper10seccancrosstheintersectionindirection1andthat20carsper10seccancrosstheintersectionindirection2ifthetrafficlightisgreen.Noturningisallowed.Initially,assumethatthetrafficlightisgreenfor30secandredfor70secindirection1.Writeasimulationalgorithmtoanswerthefollowingquestionsfora60-mintimeperiod:
Howmanycarspassthroughtheintersectionindirection1duringthehour?
Whatistheaveragewaitingtimeofacarstoppedwhenthetrafficsignalisredindirection1?
Themaximumwaitingtime?
Whatistheaveragelengthofthequeueofcarsstoppedforaredlightindirection1?
Themaximumlength?
Whatistheaveragenumberofcarspassingthroughtheintersectionindirection1duringthetimewhenthetrafficlightisgreen?
Whatisthemaximumnumber?
AnswerProblemsa-dfordirection2.
Howwouldyouuseyoursimulationtodeterminetheswitchingperiodforwhichthetotalwaitingtimeinbothdirectionsisassmallaspossible?
(Youwillhavetomodifyittoaccountforthewaitingtimesindirection2.)
2.TheDescriptionoftheProblem
Accordingtotheexistingtrafficflowtheory,webelievethatvehiclesqueuedservicetimeandthenumberofvehiclesinlinewiththePoissondistribution.
Forthequestionasked,wecalculatethe 10s asaminimumperiod.Assumingthenumberofcarsreachedtheintersection10s ineveryonehourareinPoissondistribution,andinthegivenrangeofonehour,thenwegeneratedatotalof 360 Poissonrandomnumbers,asthenumberofcarstoreach.Andwegivetheconceptofthenumberofcarsstranded,meansthatthenumberofcarsarrivedattheintersectionbutdidnotcrossitboforeamoment.Comparethenumberof thestrandedcarsand36,whichisthenumberofcarscrosstheintersectionindirection1per10sec.Wechoosethesmalleroneasthenumberofthecarscrosstheintersectioninthe10sec. Accumulatethenumberofeach10seccanobtainthenumberofthecarspassingthroughtheintersectionindirection1duringonehour.
Thesecondproblemconcerningtheaveragewaitingtimeofacarstoppedwhenthetrafficsignalisred.Tosolvethisproblems,weneedtoknowthetotalwaitingtimeofallcars,wedeterminedthewaitingtimeofthecarstrandedineach10secandaccumulatedtoobtainthetotalwaitingtime.Afterthetotalwaitingtimegot,wecanacheivetheaveragewaitingtimebydividingitintothenumberofallthecars. Then,comparetheretentiontimeofeachcarwaitingperiodtoobtainthemaximumwaitingtime.
Aboutthethirdproblem,weassumethatthelengthofallcarareinthesameandallcarsmaintainthesamesapcingwheninthequeue. Similarly,wefindthenumberofstrandedcarsineach10secperiod,multipliedbythevehiclelengthandspacing,andgetthelengthofthequeueofcarsstoppedforeachredlight,Dividedbythetotalnumberofperiodsafterthecumulativeresults,wecanobtaintheaveragelengthofthequeue. Then,bycomparingeachtimethelengthofthecarsqueuinginlonglines,wecangetthemaximumqueuelength.
Tothefourthproblem,becausethecarscanonlypasstheintersectionwheninthegreenlight,theaveragenumberofcarspassingthroughtheintersectionduringthetimewhenthetrafficlightisgreenisequaltothetotalnumberofcarspassingthroughtheintersectiondivided36thenumberofgreenlightcyclewithinonehourperiod.
Asforthefifthproblem,substantially,thedirectionforthecarsinthedirection2isthesamewiththeabovesolutionforthatinthedirection1, thedifferenceisthetimeofgreenlightis30secinthedirection1withthe 70s redlight.Bycontrastthetimeofgreenlightinthedirection2is70s,whiletheredlighttakes30s . Inaddition,thedirection2has anumberofthecarsneedtopassthrough,whilethegreenlightownsasmallercapacity.Soweneedtaketheconditonthattherewillhavethecarsstrandedintheintersectionafteragreenlightcycleintotheconsideration.Weshouldanalysethewaitingtimeandthequeuelengthofthestrandedcarsinanotherway.
Asforthelastextendedquestion,allowingthetimeoftheredlightinthedirection1changingbythestepof1sina certainrange,togetthetotalwaitingtimeineachperiod.Andthenwefindtheshortestwaitingtimeinthecertainrangeandgetthecertaintimeintheredlight.Whentakingintoaccountthedirection2,weusethesamewayinthedirection1.Thenweshouldaccumulatethetotalwaitingtimeinbothdirections,andchoosethetimeofredlightmakingthewaitingtimeshortest.
3.Models
3.1BasicModel
3.1.1Terms,DefinitionsandSymbols
Thesignsanddefinitionsaremostlygeneratedfromqueuingtheory.
●Q(t):
thenumberofthecarsarrivedatthetheintersectioninthedirection1inthe‘t’timeperiod.
●I(t):
thenumberofstrandedcarsreachtheintersectioninthedriection1 atthebeginningofthe‘t’period .
●q(t):
thenumberofthecarsinthedirection1passingthroughtheintersectioninthe‘t’timeperiod.
●D(t):
thetimeofthearrivedcarsnee