Procdings of th 009 IEEE Systms and Information Enginring Dsign Symposium, Univrsity of Virginia, Charlottsvill, VA, USA, April 4, 009 FPMisk.3 Dvloping a Travl out Plannr Accounting for Traffic Variability Jssi K. Ambros, Danil J. Bukovsky, Timothy J. Sdlak, and Scott J. Godn Abstract Currnt travl rout plannrs incorporat physical distancs and man travl tims whn calculating optimal routs btwn two points but ignor th variability in th travl tims. This factor provs important to drivrs who favor consistnt travl tims ovr routs that yild high variability in travl tim. Ths routs ar usually out of th way and thrfor, hav a highr xpctd travl tim. Howvr, studis hav shown that travl tim stability has bcom qually as important to commutrs as short xpctd travl tims [1, indicating many commutrs may prfr th longr but mor prdictabl routs. In ordr to addrss this problm, th tam has dvlopd a wb-basd travl rout plannr that calculats multipl routs for usrs. Each rout balancs a trad-off btwn xpctd travl tim and varianc in travl tim. outs ar calculatd using a probabilistic modl of travl tims that incorporats historical traffic data for th Virginia sction of th I-95 corridor. Th travl plannr uss a shortst-path optimization algorithm to calculat svral altrnativ routs. For givn starting and nding locations, th plannr rturns thr possibl routs along with travl tim information about ach rout. Each calculatd rout is associatd with a diffrnt man/varianc prfrnc combination. W I. INTODUCTION ASHINGTON, D. C. has rcntly bn rankd as th ara with th scond worst traffic in th Unitd Stats [. Urbanization is causing mor flow into th city from th suburbs of Virginia and Maryland. Th most congstd roads tnd to b th dirct routs into and out of D.C. thos with th shortst physical distanc. Howvr, with th unprdictability of rush-hour traffic congstion and othr sasonal factors, th travl tim on ths routs can vary from day to day and hour to hour. Bcaus of this irrgularity, som commutrs ar bginning to slct routs with mor prdictabl xpctd travl tims as opposd to thos with th shortst xpctd travl tims. Th projct involvs dsigning and implmnting a nw travl rout plannr similar to thos offrd by MapQust and Googl Maps that additionally accounts for th Manuscript rcivd April 6, 009. This work was supportd in part by Palo Alto sarch Cntr. J. K. Ambros, D.J. Bukovsky, T.J. Sdlak, and S.J. Godn ar undrgraduat studnts in th Systms and Information Enginring Dpartmnt, Univrsity of Virginia, Charlottsvill, VA 904 USA. variability of traffic conditions whn calculating routs. Th usr is providd with svral rout options and must slct th appropriat rout by valuating th trad-offs btwn xpctd valu and varianc in travl tim. Th problm is approachd from th standpoint of a typical optimization problm, considring both minimal xpctd travl tim and minimal varianc of travl tim as costs to minimiz. A modifid Dijkstra s algorithm uss th combination of ths two variabls to valuat th bst rout from start to finish. Th algorithm is connctd to th traffic rout ntwork data collctd and stord on a srvr. In addition to linking th algorithm to th srvr, a wb-basd intrfac is usd to display ach rout, and th associatd rout information, to th usr. Th intntion in dvloping th travl rout plannr is to provid usrs with a visual rprsntation of thir risk prfrncs whn choosing a rout btwn starting and nding locations. To do this, th systm prsnts rout options and corrsponding statistics allowing th usr to assss all possibilitis basd on prsonal prfrncs. In addition, th plannr visually displays ach altrnativ rout and th tradoff of th rout statistics that rprsnt th risks involvd with ach altrnativ. An accssibl wb-basd application incorporats th sub componnts allowing quick navigation through th intrfac. sarch was conductd on th prfrncs of commutrs whn choosing a travl rout. Commutrs ar bcoming lss concrnd with th avrag tim to thir dstination and mor concrnd and frustratd with th uncrtainty in th tim of th commut that is, th variability in travl tim [3. Th intndd usrs for th final dlivrabl ar travlrs commuting along major routs connctd to th I-95 corridor in Virginia. Th usrs risk prfrncs of xpctd valu vrsus varianc of th travl lad thm to choos diffrnt routs. Accommodating for ths divrs prfrncs, th travl rout plannr dlivrs multipl altrnat routs. II. OUTE OPTIMIZATION FAMEWOK A. Optimization algorithms Th gnral problm facd by rout plannrs is finding th optimal path btwn two points, or nods, in a ntwork of many nods. Optimization can man diffrnt things in diffrnt contxts. Th optimal path could b th shortst physical distanc, last xpnsiv, last amount of tim, tc., or vn a combination of mor than on attribut. An 1-444-453-5/ 009 IEEE 64
algorithm commonly usd in routing is Dijkstra s algorithm. For two givn nods in a ntwork, Dijkstra s algorithm dtrmins th path with th lowst cost btwn th two. In travl rout plannrs, th nods ar physical locations with a distinct latitud and longitud. Th paths btwn th nods ar a sris of road sgmnts. Sinc it is only ncssary to comput on-to-on shortst paths for this projct, th implmntation of Dijkstra s is prfrrd bcaus of its spd and simplicity [4. A*, a modification to Dijkstra s mthod, is anothr typ of algorithm usd to calculat optimal paths. This algorithm dcrass computational rquirmnts from that of Dijkstra s by using an additional huristic to pnaliz paths that progrss in a dirction away from th dstination nod. B. oad ntworks In ordr to solv shortst-path algorithms as mntiond abov, a ntwork consisting of nods and arcs (paths btwn th nods must xist. Nods in a road ntwork ar uniqu latitud/longitud points along roads, intrsctions, and on/off ramps of highways. Th arcs btwn ths points ar th road sgmnts. Each arc has multipl attributs, or costs, that th algorithm uss to dtrmin th optimal path. For road ntwork arcs, attributs can includ th physical lngth of th sgmnt, th spd limit, th avrag stimatd travl tim on th sgmnt ovr a givn priod, tc. Dpnding on th typ of optimization problm, diffrnt wightd combinations of attributs may b usd as arc costs whn implmnting Dijkstra s algorithm. III. POBLEM FOMULATION A dirctd ntwork graph ( V, E xists with a st of vrtics and a st of dgs. For ach dg, E thr is a random variabl X that rprsnts th travl tim along ach dg. Th man travl tim along dg is rprsntd by: G = µ = Ε [ Th varianc in travl tim along dg is rprsntd by: = Ε[( µ A rout is a connctd path through G. Th travl tim for is: Th objctiv is to find th rout that minimizs a combination of th xpctd rout travl tim and th xpctd varianc in rout travl tim. Th xpctd travl tim for is givn by: Ε[. = µ As th natur of th projct is to prsnt th usr with a visualization of thir dcision-making procss whn choosing a rout, th typical assumptions of travl tim dpndnc on narby traffic may b ignord. Bcaus this assumption is ignord, all X ar considrd indpndnt and th xpctd varianc in travl tim for is givn by: Ε[( µ = Lt th xpctd travl tim for a rout b rprsntd by: µ = Ε [ Lt th varianc associatd with a rout b rprsntd by: Givn starting and nding s, t V vrtics, find a rout to minimiz th combination of th rout s xpctd travl tim and varianc using α as th wight associatd with th xpctd rout travl tim: = Ε[( µ ( 1 αµ + α Bcaus of th indpndnc of th random variabls, this wightd combination is qual to th summation of th costs associatd with ach dg that is, th wightd combination of th xpctd dg travl tim and th varianc in travl tim associatd with th dg. ( αµ + (1 α Sinc th objctiv can b distilld to minimiz an additiv function of dg costs, th problm at hand may b solvd as a shortst path problm. A. Data IV. CONSTUCTION AND IMPLEMENTATION Two diffrnt road databas sourcs wr usd in implmnting this projct. Th data for a complt and connctd road ntwork was obtaind from th Unitd Stats Dpartmnt of th Intrior (DOI. A dtaild U.S. road atlas was providd as a data fil on th DOI wbsit. This data contains all distinct roads in th U.S., including both road sgmnts and intrsctions. Th traffic and travl tim information was obtaind through th Univrsity of Virginia Cntr for Transportation Studis Smart Travl Lab in Charlottsvill, Virginia. Includd in this ntwork ar 1,046 sgmnts of numbrd routs along th I-95 corridor from th North Carolina and Virginia bordr to th Virginia, Maryland, and DC bordrs. Th Smart Travl Lab providd data that was collctd in two-minut intrvals for a priod of two months on vry road sgmnts. This data, stord in an XML fil format, includs th spd and th travl tim ovr th sgmnt for a car passing at th rcordd tim. Using this data, a C# script was dsignd and codd to loop through all of th data and calculat th man and varianc of th travl tims for vhicls travling along ach road sgmnt. Using th man valus, th varianc of th xpctd travl 1-444-453-5/ 009 IEEE 65
tims was calculatd using: Var ( X = Ε[( X µ Th sum of th valus for (X-µ for ach individual nod was calculatd. To calculat varianc, th script took this final sum at ach nod and dividd it by th numbr of XML fils to find th final valu for th varianc. This procss rturns: ( 1 1 ( x n Var Howvr, sinc th valu for n in this xprimnt is significantly high (tns of thousands of XML fils, th cofficint approachs on and th varianc calculation rducs to Var (x. It is important to not that th data collctd spd and travl tims uniformly ovr all twnty-four hours of th day. Using this, th data ncompasss all possibl traffic conditions into its calculation. Thrfor, whil an ara of th intrstat may hav high varianc at spcific tims (.g. rush hour, it was found that th ovrall varianc of th road sgmnt is lss whn compard to highways narby with lowr spd limits, fwr traffic lans, and mor traffic lights. As prviously statd, th tam usd th U.S. DOI road data for th final implmntation of th algorithm. Th DOI providd a wll-connctd and asily travrsabl road ntwork allowing for a succssful implmntation of th shortst path algorithm. To us this ntwork, avrags of th valus for varianc and man travl tim wr calculatd ovr all road sgmnts in th prvious datast. Sarching manually by similar road nams and locations, travl tim data was insrtd into th DOI databas ntwork and usd whn complting th projct. B. Databas Th databas includs ach arc with th Traffic Mssag Channl (TMC cod as th primary ky. This cod is usd whn dlivring traffic information to drivrs and is dscribd in dtail in [5. For ach arc, data for th avrag, varianc, minimum, and maximum of th travl tim ar stord. Th data is stord on a Linux srvr and PHP script is usd to link th wb application to th PostgrSQL databas. Th data is containd in two sparat tabls in th databas. Th first tabl includs all availabl gographic data on vry major road sgmnt in th Unitd Stats. This ncompasss narly 195,000 diffrnt sgmnts, ach rprsntd by a uniqu TMC cod. For ach cod, th tabl stors data on th nam, numbr, stat, county, zip cod, and latitud and longitud of th ndpoints for ach road sgmnt. Th significanc of this tabl is to provid th algorithm with th narst ntwork nod to inputtd starting and nding locations. To us this data in th algorithm, ach uniqu latitud/longitud pair was assignd an individual nod ID rprsnting th point. This convrsion hlps simplify th classification of ach point as an F_Nod ( from nod, or start point or a T_Nod ( to nod, or ndpoint. Thrfor, th currnt dsign only allows for travl in a singl dirction along an arc (toward th T_Nod whn at a givn F_Nod. Many cass xist whr a TMC road sgmnt has a T_Nod similar to svral othr sgmnts F_Nods. In this cas, by simplifying th procss and giving ach nod its own uniqu ID, it is asir to facilitat travl btwn nods for th diffrnt road sgmnts. Uniqu nod IDs wr found for th latitud/longitud pairs and wr assignd for ach vry nod in th tabl. Th scond tabl in th databas, th oads tabl, rprsnts th roads for which th tam has accurat travl tim data. This includs th 1,046 diffrnt roads that ar linkd to a tabl of citis, containing gographic data on 35,000 citis in th US, by ach road sgmnt s primary ky, th TMC cod. This tabl includs th data from th C# script dscribd in Part A. Th script outputtd a CSV (Comma Sparatd Valu fil containing ach TMC cod s xpctd valu and varianc of travl tim. Using this CSV fil, a sparat tabl was cratd in a databas tool and th Citis tabl was qurid to find th uniqu F_Nod and T_Nod ID s for th 1046 diffrnt TMC cods. Finally, th data was importd into th PostgrSQL databas. This tabl contains a majority of th data usd in th implmntation of th shortst path algorithm that calculats optimal routs. Th tabls listd abov wr usful in th initial tsting using th Smart Travl Lab data; howvr, for th final implmntation of th projct, data from th U.S. DOI oad Atlas wr addd and usd instad. Ths tabls wr st up in an idntical styl, with F_Nods and T_Nods rprsnting starting and nding points. As prviously mntiond, travl tim data from th initial databas tabls wr usd and th calculatd avrag valus wr addd into th DOI oad Atlas databas tabls. Using this information, th format of th prvious tabls was mirrord and th algorithm was allowd to oprat on th mor dtaild connctd road data ntwork. C. Algorithm Th algorithm provids th usr with optimal routs, ach basd on th wighing of statistics in th road ntwork data. To find th optimal rout, th algorithm utilizs an intrprtation of th A* sarch algorithm (a common algorithm using nods and arc lngths for finding th shortst path, if it xists, btwn two points. Each of th road ntwork sgmnts start- and nd-points ar nods. Th path btwn ths two conncting nods is an arc. Th arc lngths ar th travl tims (masurd in minuts btwn vry pair of conncting nods. Th A* algorithm rturns th shortst path basd on th stord information and th starting nod (origin inputtd by th usr and th nding nod (dstination inputtd by th usr. Th algorithm is an informd sarch algorithm, so it sarchs th routs that appar to most likly lad towards th goal by using a 1-444-453-5/ 009 IEEE 66
huristic rlating to rmaining distanc to th dstination, in addition to th distanc alrady travld. Th systm provids th usr with up to thr distinct routs for th inputtd origin and dstination by xcuting th optimization algorithm with thr diffrnt statistics usd as th cost, or arc lngth. Th algorithm runs using th following statistics as th arc lngth for ach sgmnt in th road ntwork: only xpctd travl tim (ETT, only variability in travl tim (VTT, and a wightd combination of 50% ETT and 50% VTT. Th systm displays ach distinct rout to th usr as a chronological squnc of road numbrs and dirctions along th rout in addition to physical distanc travld on ach road throughout th rout. Th systm also displays to th usr ach distinct rout on a singl road map using KML fils with th ability to zoom and shift th display. Each distinct rout will b clarly markd in diffrnt colors and a ky will b providd. Th systm uss th A* algorithm implmntd in Octav script to quickly and accuratly output svral travl routs basd on th wighing of significanc btwn travl tim variability and xpctd travl tim. Th systm crats KML coordinats to display routs dirctly on a wb pag using a Googl Maps intrfac. Th algorithm that is usd initially collcts th usrntrd data via HTML forms and uss PHP script to xcut th Octav script on th srvr. Th start and nd gographic locations, as wll as th wights for th varianc and avrag travl tim, ar providd to th script. It conncts to th databas and quris for th start and nd nod closst to th providd start and nd gographic locations by rturning th nod with minimum distanc to a latitud/longitud coordinat. Th algorithm uss two trlik data structurs to contain th st of nods in th compltd tr (Closd st and th st of nods that hav not bn closd yt (Opn st. As ach nod is visitd, it is addd to th Opn st and th wightd scor for th arc from th prvious nod to th currnt nod is calculatd. Addd to this scor is th huristic valu calculatd using th straight-lin distanc btwn th currnt and nd nods, multiplid by th wightd sum of th minimum varianc (pr mil that is gratr than zro and th minimum avrag travl tim (pr mil that is gratr than zro. In thory, this huristic valu could b zro whn th variancs of all arcs ar zro, but as th lngth of th rout btwn th start- and nd-points incrass, th probability of all-zro variancs dcrass. Th choic of th huristic function was mad sinc it will always b lss than th actual distanc of th rout to b travld, but as clos to that distanc as possibl. Th algorithm stps through th Opn st of nods, updating thir currnt path cost from th start nod whn it finds a nw parnt nod with a smallr ovrall cost. Th algorithm complts whn it discovrs th nd nod and adds it to th Closd st, or it rmovs th last lmnt from th Opn st, indicating that it did not find a path to th nd nod. Aftr th algorithm complts, th coordinats of ach prvious nod in th path is qurid from th databas and outputtd back into th HTML of th wb pag. This crats a list of coordinats that ar utilizd by th Googl Maps intrfac in ordr to print a lin (singl calculatd rout on a roadway map for asy intrprtation by usrs. D. Wb Intrfac Th wb intrfac includs input boxs for th starting and nding city and stat locations. Th algorithm runs and rturns an intrfac to th usr that displays ach distinct rout on a singl road map using KML coordinats with th ability to zoom and shift th display. A visual tradoff plot also displays th avrag, minimum, and maximum travl tims. Th usr can slct hyprlinks to accss th systmatic dirctions for ach rout. Each distinct rout is displayd to th usr as a chronological squnc of road numbrs and dirctions. Th following statistics for ach distinct rout ar also displayd to th usr: total avrag travl tim, total variability in travl tim, minimum travl tim, and maximum travl tim. This information allows usrs to assss th risks and bnfits of ach rout and thn us ths rsults to mak thir dcision. Th intrfac is a simpl dsign that contains only th most ncssary functionality and information. This allows th usr to minimiz thir tim spnt navigating th sit and raching thir goal of finding a rout to thir dstination. Th wb intrfac provids th usr with th ability to navigat through th systm without prior training and offrs clarly labld navigational buttons. Th wbsit was cratd using HTML and PHP script. Th HTML display provids th structur of th pag whil th PHP script links th intrfac to th PostgrSQL databas, whr th traffic data is stord. E. Dsign Issus Th availabl road ntwork data sts rsarchd wr not intndd for a shortst path solvr, nor wr diffrnt ntworks consistnt with on anothr. Links wr missing in th data that causd th rsulting routs to b incomplt. In ordr to illustrat a proof of concpt, nw but ralistic data was sampld from th Smart Travl Lab s data and xtrapolatd onto th DOI road sgmnts. It is rcommndd that a mor unifid traffic databas b acquird and usd for futur work. A. Tst Procdur V. TESTING To tst th nw systm, starting and nding points wr chosn at Dumfris, Virginia and Tyson s Cornr, Virginia, rspctivly. First, th optimal routs for minimal travl tim and minimal varianc wr calculatd using th data xplaind in CONSTUCTION AND IMPLEMENTATION: Sction B. Thn, as xplaind in CONSTUCTION AND IMPLEMENTATION: Sction E, th algorithm was tstd aftr adjusting th avrag varianc for intrstats that would b 1-444-453-5/ 009 IEEE 67
significantly affctd by pak travl tims, by twic th normal valu. It was shown that variabl travl tim could b a significant input whn valuating an optimal travl rout whn th diffrncs btwn altrnativ routs travl tims and variancs wr sufficintly gratr. Spcifically, this xampl rcommndd travling from I-95 North to I-495 whn wighting solly th varianc of th travl tim. Howvr, whn considring tims with a high variability on I-95 and I-495, th systm rcommnds using out 34 North to I-66 East towards Tyson s Cornr, compltly avoiding I-95 and I-495 and minimizing total travl tim variability. As shown in Tabl I, th algorithm corrctly chos th rout with th lowst xpctd travl tim whn th wight of travl tim was maximal. It also corrctly chos th rout with th lowst varianc in travl tim whn th wight of travl tim was minimal. TABLE I OUTE STATISTICS FO EXAMPLE SEACH out (travl tim wight Avg. Travl Tim (min Varianc in Travl Tim (min out 1 (0.0 45.46 5.06 out (0.5 31.41 30.45 out 3 (1.0 31.41 30.45 B. Significant sults As xpctd, th systm outputtd thr sparat routs basd on th wights. On rout, basd solly on varianc, rcommndd th drivr rmain on th intrstat and travl from I-95 North to I-495. This rout, whil longr and providing a highr man xpctd travl tim, providd a lowr ovrall varianc in th xpctd travl tim whn considring data avrag ovr all twnty-four hours of th day. Th othr routs wr computd by assigning qual wights to man and varianc of th xpctd travl tim and anothr rout basd solly on minimizing xpctd travl tim. As xpctd, ths routs rcommndd th drivr tak out 34 North to Intrstat 66 East. Whil ths routs providd a highr varianc in th travl tim, th man xpctd tim was minimizd. A. Data Consistncy VI. ECOMMENDED FUTUE WOK Th tam found limitations with ach availabl road ntwork usd. Du to th inconsistncy among various road ntworks, th tam was unabl to combin th datasts to mt th nd of th systm. Furthr work in this ara should focus primarily on lvraging xisting road ntworks to dvlop an original, comprhnsiv road ntwork databas with accurat traffic valus. This ntwork should b built with th shortst path problm framwork in mind, and, thrfor, b a complt ntwork. B. Usr Intrfac Dsign Th usr intrfac currntly bing usd is simplifid. Futur work to th intrfac should allow inputting spcific strt addrsss, displaying mor-dtaild maps, providing mor accurat and comprhnsiv dirctions, and prsnting tradoff information mor clarly. C. Tim Dpndnt outing Th data usd for th first itration of th wbsit uss 4- hour historic traffic data. Howvr, th tim of day gratly affcts th man travl tim and variability of travl tim on many routs. Futur work should dvlop an algorithm that taks into account th tim of day th drivr plans to pass on crtain routs whn calculating travl tims. This would hlp to allviat th problms of pak variancs and travl tims bing avragd ovr th ntir day, voiding much of th xtrm valus influnc whn calculating altrnativ routs. VII. CONCLUSION Som drivrs prfr routs that ar mor consistnt to unprdictabl ons. Giving wights to man travl tims and th variability of travl tims allows altrnativ routs to b dtrmind. Ths altrnativ routs provid a visualization of ach usr s prsonal risk prfrncs. Tsting th systm dmonstratd that it is possibl to provid usrs altrnat routs whn variability and xpctd travl tim ar sufficintly diffrnt for ach rout. Th xampl providd confirms both this and th succssful proof of concpt of th systm and th algorithm. Futur work should b dirctd towards improving th data, adding supplmntary functionality to th usr intrfac, and incrasing th fficincy of th algorithm in ordr to minimiz computing tim, allowing th systm to b usd in a widr varity of applications. ACKNOWLEDGMENT Th authors thank thir tchnical advisor andy Cogill and Palo Alto sarch Cntr for providing th guidanc and rsourcs to complt this projct. EFEENCES [1 J. Asnsio and A. Matas, Commutrs Valuation of Travl Tim Variability, Transportation sarch: Part E, vol. 44, no.6, pp. 1074 1085, Novmbr 008. [ T. Lomax, 007 Annual Urban Mobility port. Collg Station, TX: Txas Transportation Institut, 007. [3 H.K. Lo, X.W. Luo and B.W.Y Siu. Dgradabl Transport Ntwork: Travl Tim Budgt of Travlrs with Htrognous isk Avrsion, Transportation sarch: Part, vol. 40, no 9, pp.79 806, Novmbr 006. [4 F.B. Zhan and C. Noon, Shortst Path Algorithms: An Evaluation Using al oad Ntworks, Transportation Scinc, vol. 3, no. 1, pp. 65-73, Novmbr 1996. [5. Schuman, I-95 Vhicl Prob Projct Intrfac Guid, INIX, pp. 15-3, April 008. 1-444-453-5/ 009 IEEE 68