From d6551e291d3cb8c5412858c9ab19270e97a25a6e Mon Sep 17 00:00:00 2001 From: "niehues.mark@gmail.com" <niehues.mark@gmail.com> Date: Tue, 5 May 2020 14:08:31 +0200 Subject: [PATCH] random selecting charging stations --- .gitignore | 1 + evaluation/configs/bigger.yaml | 25 ++- evaluation/configs/example.yaml | 18 +- evaluation/results/bigger/queries/astar.csv | 2 + evaluation/results/bigger/queries/charge.csv | 2 + evaluation/results/bigger/queries/classic.csv | 2 + evaluation/results/example/queries/astar.csv | 200 +++++++++--------- evaluation/results/example/queries/charge.csv | 200 +++++++++--------- .../results/example/queries/classic.csv | 200 +++++++++--------- .../results/example/queries/gasstation.csv | 123 ++--------- evaluation/run.py | 64 ++++-- evrouting/charge/routing.py | 8 +- evrouting/gasstation/routing.py | 9 + evrouting/graph_tools.py | 15 -- evrouting/osm/imports.py | 26 ++- 15 files changed, 444 insertions(+), 451 deletions(-) create mode 100644 evaluation/results/bigger/queries/astar.csv create mode 100644 evaluation/results/bigger/queries/charge.csv create mode 100644 evaluation/results/bigger/queries/classic.csv diff --git a/.gitignore b/.gitignore index 51f76b0..35e7119 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ dist *.egg-info .ipynb_checkpoints *.osm +mapcache diff --git a/evaluation/configs/bigger.yaml b/evaluation/configs/bigger.yaml index 9d2ddd5..1076d0b 100644 --- a/evaluation/configs/bigger.yaml +++ b/evaluation/configs/bigger.yaml @@ -5,7 +5,7 @@ type: query charging_stations: charging_stations.json maps: - oberpfalz-latest.osm -queries_per_setup: 1 +queries_per_setup: 10 setups: - mu_s: 300 # Start and Target Soc mu_t: 0 @@ -13,4 +13,25 @@ setups: capacity: 300 # kWh consumption: type: gasstation - consumption_coefficient: 0.5 # kWh/s + consumption_coefficient: 0.1 # kWh/s + - mu_s: 300 # Start and Target Soc + mu_t: 0 + charging_stations: 20 # Max Number of charging Stations to be inserted. + capacity: 300 # kWh + consumption: + type: gasstation + consumption_coefficient: 0.1 # kWh/s + - mu_s: 300 # Start and Target Soc + mu_t: 0 + charging_stations: 40 # Max Number of charging Stations to be inserted. + capacity: 300 # kWh + consumption: + type: gasstation + consumption_coefficient: 0.1 # kWh/s + - mu_s: 300 # Start and Target Soc + mu_t: 0 + charging_stations: 100 # Max Number of charging Stations to be inserted. + capacity: 300 # kWh + consumption: + type: gasstation + consumption_coefficient: 0.1 # kWh/s diff --git a/evaluation/configs/example.yaml b/evaluation/configs/example.yaml index 7e10dac..73d27e7 100644 --- a/evaluation/configs/example.yaml +++ b/evaluation/configs/example.yaml @@ -9,8 +9,22 @@ queries_per_setup: 100 setups: - mu_s: 300 # Start and Target Soc mu_t: 0 - charging_stations: 10 # Max Number of charging Stations to be inserted. + charging_stations: 1 # Max Number of charging Stations to be inserted. capacity: 300 # kWh consumption: type: gasstation - consumption_coefficient: 0.5 # kWh/s + consumption_coefficient: 0.1 # kWh/s + - mu_s: 300 # Start and Target Soc + mu_t: 0 + charging_stations: 2 # Max Number of charging Stations to be inserted. + capacity: 300 # kWh + consumption: + type: gasstation + consumption_coefficient: 0.1 # kWh/s + - mu_s: 300 # Start and Target Soc + mu_t: 0 + charging_stations: 3 # Max Number of charging Stations to be inserted. + capacity: 300 # kWh + consumption: + type: gasstation + consumption_coefficient: 0.1 # kWh/s diff --git a/evaluation/results/bigger/queries/astar.csv b/evaluation/results/bigger/queries/astar.csv new file mode 100644 index 0000000..1c858b7 --- /dev/null +++ b/evaluation/results/bigger/queries/astar.csv @@ -0,0 +1,2 @@ +start_node,target_node,query_time,trip_time,nodes,edges,charging_stations +287518807,3810958499,0.6319389899999805,2573.612171235915,726484,1483098,256 diff --git a/evaluation/results/bigger/queries/charge.csv b/evaluation/results/bigger/queries/charge.csv new file mode 100644 index 0000000..92308a5 --- /dev/null +++ b/evaluation/results/bigger/queries/charge.csv @@ -0,0 +1,2 @@ +start_node,target_node,query_time,trip_time,nodes,edges,charging_stations +287518807,3810958499,4.758653935999973,None,726484,1483098,256 diff --git a/evaluation/results/bigger/queries/classic.csv b/evaluation/results/bigger/queries/classic.csv new file mode 100644 index 0000000..55fadf3 --- /dev/null +++ b/evaluation/results/bigger/queries/classic.csv @@ -0,0 +1,2 @@ +start_node,target_node,query_time,trip_time,nodes,edges,charging_stations,dijkstra_rank +287518807,3810958499,0.36018652400002793,2573.612171235915,726484,1483098,256,0 diff --git a/evaluation/results/example/queries/astar.csv b/evaluation/results/example/queries/astar.csv index f0132aa..fe730fb 100644 --- a/evaluation/results/example/queries/astar.csv +++ b/evaluation/results/example/queries/astar.csv @@ -1,101 +1,101 @@ start_node,target_node,query_time,trip_time,nodes,edges,charging_stations -2598984220,317431286,0.014743257001100574,498.1140111598792,2827,5691,4 -1574635376,2608394376,0.0005354649983928539,None,2827,5691,4 -292485282,2639932980,0.012163879997387994,288.6212594295983,2827,5691,4 -7115183090,49109518,0.02806976899955771,904.9345063361109,2827,5691,4 -563188714,2616315920,0.004677771001297515,441.49586624662686,2827,5691,4 -2705157118,3299068955,0.004833793002035236,344.81142283925794,2827,5691,4 -3462099369,1935264851,0.02602331299931393,1063.5350428566937,2827,5691,4 -1827520760,1927634075,0.0005738439976994414,None,2827,5691,4 -7286135582,318014975,0.00770781800019904,291.32161516417983,2827,5691,4 -1949865714,1929118103,0.008719715002371231,247.41047878926767,2827,5691,4 -7321855875,7286135544,0.004166588998486986,203.13436437693898,2827,5691,4 -7031746253,1362941693,0.01121524500194937,567.6960773066983,2827,5691,4 -549928581,7042580423,0.023464070000045467,652.1459029950373,2827,5691,4 -306636859,3123285393,0.0015295260018319823,134.30855985472655,2827,5691,4 -1828263505,7245276253,0.00288734000059776,172.3946058972845,2827,5691,4 -3111465609,333265684,0.0034014749980997294,158.3747300421578,2827,5691,4 -574465020,7158827509,0.0005803460007882677,50.69540952494169,2827,5691,4 -4955446038,2701786783,0.016037132001656573,474.42019948624187,2827,5691,4 -1505057722,2598982820,0.0022350040017045103,213.63162923041278,2827,5691,4 -6417387121,45217575,0.015323709001677344,511.57995760781023,2827,5691,4 -3307706690,2608500686,0.020143385001574643,704.3773911683422,2827,5691,4 -508823988,294921054,0.01614571499885642,445.6549504206056,2827,5691,4 -1672267516,1253890971,0.019938225999794668,463.9904522865263,2827,5691,4 -1827268706,306636851,0.006967754001379944,307.2300820908875,2827,5691,4 -408478755,1768859071,0.011055791001126636,697.8556376483256,2827,5691,4 -1574635374,600855062,0.015535171998635633,322.93290424355115,2827,5691,4 -2598983963,317766814,0.013583924999693409,296.63342740485876,2827,5691,4 -321209227,646729161,0.01865234400247573,442.53836425358986,2827,5691,4 -6807158096,3123285424,0.011086653998063412,202.045423495865,2827,5691,4 -549943301,2598987933,0.0009277470016968437,35.523732987539006,2827,5691,4 -1505052514,333265696,0.006441278997954214,226.88367088862458,2827,5691,4 -549931432,2604686222,0.002590890999272233,86.4933235550859,2827,5691,4 -318015042,288947631,0.03273827599696233,421.1855259966528,2827,5691,4 -7257113598,7031883144,0.015127848997508409,481.6685944984319,2827,5691,4 -6448459782,4016874494,0.002013528999668779,131.90751888540956,2827,5691,4 -473666790,418009807,0.015151703999435995,616.8422429539488,2827,5691,4 -2709966866,7140363810,0.01917971899820259,666.1717265390163,2827,5691,4 -4955446021,6053177179,0.00788183199983905,257.7677435214174,2827,5691,4 -574505825,7286135580,0.013873551997676259,502.49813461242684,2827,5691,4 -3152652398,2632841195,0.00022405999698094092,16.05410064430767,2827,5691,4 -6389441585,549931439,0.008416862998274155,286.0696115473284,2827,5691,4 -4955445788,2598984696,0.016510842000570847,710.6103593111196,2827,5691,4 -2635713649,34911573,0.025726518000737997,None,2827,5691,4 -2554184488,288944214,0.009566790002281778,452.6269758518667,2827,5691,4 -418009813,574496336,0.00968351999836159,488.8373405449547,2827,5691,4 -3462099513,365064191,0.003157262999593513,241.9305441128864,2827,5691,4 -4321209903,288947635,0.0024025400016398635,89.32726022221709,2827,5691,4 -2621360530,1362941667,0.008783397999650333,404.88978534474785,2827,5691,4 -2621386740,426948337,0.020809811001527123,704.90873165616,2827,5691,4 -360747463,1253890891,0.0013235480000730604,115.8616723797326,2827,5691,4 -90713483,1828418233,0.0018213900002592709,67.6729183253639,2827,5691,4 -318015042,4016874623,0.0029825359997630585,146.82532607152257,2827,5691,4 -5095519274,6001542005,0.004744697998830816,394.8821819040191,2827,5691,4 -574475518,2621506083,0.00891107200004626,296.1749244866103,2827,5691,4 -292728423,4845192812,0.008807941998384194,324.25303154204727,2827,5691,4 -7245276253,469718545,0.0072528470009274315,225.2174804198681,2827,5691,4 -2600456373,474997349,0.00926098899799399,511.11398598162265,2827,5691,4 -430534355,1830470690,4.0013997931964695e-05,3.5819980124555086,2827,5691,4 -318261957,2616315925,0.013789652999548707,478.54912090204874,2827,5691,4 -6908174001,600858234,0.02264077899963013,676.669550658477,2827,5691,4 -45217432,317839009,0.0048265280020132195,214.85683549218038,2827,5691,4 -4016874515,2598981737,0.0159348580018559,414.03216869826895,2827,5691,4 -34053772,2709164536,0.012566968001920031,611.2709913034893,2827,5691,4 -2614897350,410488856,0.012109030001738574,490.60053969987376,2827,5691,4 -574482753,7028725556,0.023951327999384375,768.0748904497931,2827,5691,4 -408478763,2612706786,0.00684419900062494,542.9635549695838,2827,5691,4 -674511701,360747493,0.00901634600086254,540.9390299817543,2827,5691,4 -549931430,2608394482,0.009636134000174934,291.48713827057804,2827,5691,4 -2613167250,405229458,0.0016435950019513257,150.98464174372822,2827,5691,4 -5576939248,2611370483,0.005573631999141071,247.59474539609872,2827,5691,4 -2696567034,5609333812,0.014546899001288693,544.8291915663265,2827,5691,4 -34053459,2605041420,0.02268625000215252,745.9962543239784,2827,5691,4 -469872413,2612700811,0.01815928400174016,531.0346088911808,2827,5691,4 -7202546042,426948337,0.003651994000392733,399.65304499593276,2827,5691,4 -508824243,317839542,0.008873923998180544,250.2341684437973,2827,5691,4 -1828269035,549920915,0.005189600000448991,229.8196777256521,2827,5691,4 -2952146882,549938445,0.003061102001083782,138.30182936835243,2827,5691,4 -317767230,7030602781,0.001412981997418683,45.661832779945314,2827,5691,4 -7030602779,600861362,0.005784600001788931,194.54897286425881,2827,5691,4 -574546116,665115012,0.01647321700147586,518.410521468413,2827,5691,4 -1988057398,2637079129,0.02519596599813667,1144.52259390045,2827,5691,4 -4955446046,7182110440,0.009428920999198454,380.9316035609116,2827,5691,4 -3211622692,318260724,0.0035589710023486987,265.28715514357395,2827,5691,4 -574457822,3111465610,0.005646713998430641,187.30089552278895,2827,5691,4 -474997016,3123285422,0.004333002998464508,238.8794603618747,2827,5691,4 -4226442919,3522264443,0.0032042519997048657,190.36745785565165,2827,5691,4 -7140363801,333265692,0.017208389999723295,666.7530396460336,2827,5691,4 -1828263512,17689717,0.025256663997424766,None,2827,5691,4 -574449258,1929118240,0.020182126998406602,529.8540594348103,2827,5691,4 -365070092,3211622686,0.00402480699995067,294.8068842064823,2827,5691,4 -574465023,2616462233,0.002440683001623256,123.32236605762252,2827,5691,4 -1362941674,7140339574,0.007318759999179747,187.11648556273997,2827,5691,4 -646729161,3123285391,0.003003529000125127,108.17611080310326,2827,5691,4 -1934201756,2554184498,0.022802662999310996,818.7191029257017,2827,5691,4 -2623041440,4955446059,0.021074513002531603,583.5139470626206,2827,5691,4 -288947629,6448462033,0.009901900997647317,410.99989791340255,2827,5691,4 -1672340376,1362941687,0.00014201799785951152,None,2827,5691,4 -6943345426,7081828735,0.019885090998286614,606.2296135599523,2827,5691,4 -317840788,318266812,0.010993509000400081,360.331834453331,2827,5691,4 -473666764,360747431,0.002763624997896841,286.04783495751815,2827,5691,4 +7321902574,318014974,0.007568578999780584,238.1110904996911,2827,5691,3 +4016874515,2611369730,0.003537241000231006,113.40853811212274,2827,5691,3 +7182110441,268980011,0.006901079999806825,575.546920845741,2827,5691,3 +1934188724,34911575,0.02502793900021061,None,2827,5691,3 +1867147194,549947326,0.009264481999707641,306.3977004462799,2827,5691,3 +418009253,1411856646,0.024911561000408255,926.5828722425748,2827,5691,3 +6448459754,2608429407,0.005626917999506986,110.63446581791817,2827,5691,3 +1821291294,318261953,0.009873198999230226,366.3184015404222,2827,5691,3 +1927634061,360747579,0.012953817000379786,465.50083809477644,2827,5691,3 +79954921,2614897354,0.011293107000710734,626.9765430725013,2827,5691,3 +1934189119,563194918,0.002633582000271417,243.91394290107357,2827,5691,3 +408478784,2614897352,0.004225145999953384,376.06559393330286,2827,5691,3 +3111465595,474997347,0.005856654999661259,233.37360027751848,2827,5691,3 +1672267587,7115310188,7.70900005591102e-05,None,2827,5691,3 +426948340,2623041441,0.017265800000132003,607.4759695626486,2827,5691,3 +7030602777,2614920443,0.011115194000012707,309.14324380214833,2827,5691,3 +2611494658,7074500839,0.02345366000008653,649.6622428768856,2827,5691,3 +6448461998,2604687802,0.010816668999723333,369.2373455358261,2827,5691,3 +317767227,748845499,0.02000224200037337,438.7724254643551,2827,5691,3 +7081828735,1757613834,0.017728652999721817,638.132348548364,2827,5691,3 +600861362,34053452,0.0033281639998676837,257.2835741707556,2827,5691,3 +7030623427,5609334121,0.009842467999988003,505.63577043459526,2827,5691,3 +793260945,1935264851,0.02548328200009564,982.3373940665655,2827,5691,3 +2616315923,7257113601,0.004644349000045622,232.54030844332127,2827,5691,3 +1827520762,426930253,0.02144544400016457,555.1219663447,2827,5691,3 +2997117857,45217462,0.0007760219996271189,239.69584582112356,2827,5691,3 +7074500836,318015069,0.006032391999724496,358.3313926632318,2827,5691,3 +1672334351,2997117873,0.014431023999350145,619.7320443863234,2827,5691,3 +5113940071,574546136,0.00032739900052547455,38.36680561831532,2827,5691,3 +3307706662,408478842,0.0002016809994529467,106.17669377184302,2827,5691,3 +365065394,2619115981,0.004220568000164349,211.22096795741354,2827,5691,3 +2973923689,2604686273,0.004096565000509145,314.30553801234936,2827,5691,3 +5576943376,549938448,0.012980622999748448,378.7504835821481,2827,5691,3 +7140363797,4475752956,0.006811612999626959,405.1173694042988,2827,5691,3 +2608501043,549944087,0.006625901999541384,309.83263677334804,2827,5691,3 +7115183094,1821291310,0.006649093999840261,166.72662919095825,2827,5691,3 +4016874408,469720334,0.014832183000180521,474.5248341109552,2827,5691,3 +7115183090,508823959,0.003660451000541798,99.25054650686562,2827,5691,3 +2598984220,2639898818,0.007726304999778222,315.22936375978804,2827,5691,3 +1934189313,34053448,0.01874155099994823,996.5041118441444,2827,5691,3 +306639025,2608786068,0.005269233000035456,335.3712680198829,2827,5691,3 +549931420,2635713653,0.019543730000805226,443.3356339909103,2827,5691,3 +1929118250,7246644040,0.023990942000637006,792.7725145604651,2827,5691,3 +474997344,321209230,0.008237455999733356,360.1032536260311,2827,5691,3 +4383156579,318014986,0.006319156999779807,334.8287484267631,2827,5691,3 +2701786796,7321902570,0.014290217000052508,396.4678926102016,2827,5691,3 +418009817,408478815,0.006516372000078263,393.2077751296899,2827,5691,3 +665115010,7180800494,0.005075002000012319,121.99627562066787,2827,5691,3 +7286240204,7207579520,0.012112248000448744,444.57943336659633,2827,5691,3 +7286240202,3273201483,0.0034503960005167755,151.17570520208938,2827,5691,3 +34053458,1672267572,0.012001237999356817,534.9695327831129,2827,5691,3 +6448461991,1827520765,0.025130322999757482,None,2827,5691,3 +2600451785,2705157134,0.0119646510001985,391.70762990375385,2827,5691,3 +1672267690,306639024,0.00011611700028879568,None,2827,5691,3 +317767228,574482753,0.013925289000326302,360.4443894533518,2827,5691,3 +6448461999,317839537,0.001202407000164385,113.79275358739032,2827,5691,3 +45217495,3996162743,0.016943106999860902,370.86620593338074,2827,5691,3 +288947123,7030602775,0.0084678539997185,380.7827532273404,2827,5691,3 +318260942,1672267832,0.02540487199985364,None,2827,5691,3 +4955446038,6603016874,0.008938343999943754,338.336413426195,2827,5691,3 +1574635372,7140363795,0.0005431959998531966,None,2827,5691,3 +2611404223,1636935570,0.01713199500045448,477.29034631823833,2827,5691,3 +7182110439,45217473,0.007642070000656531,588.6851099661361,2827,5691,3 +7115244209,418009812,0.014710782999827643,389.59809435549516,2827,5691,3 +2604685993,288944217,0.019526024999322544,517.7769043458792,2827,5691,3 +2600670536,665115005,0.002605667000352696,346.37375978016064,2827,5691,3 +306636853,426948333,0.022952964000069187,572.6741026406311,2827,5691,3 +7165728796,549947346,0.010273412999595166,397.60081105225186,2827,5691,3 +34053442,79952473,0.004863211000156298,159.72842896428756,2827,5691,3 +549943303,292484626,0.02529727199998888,None,2827,5691,3 +1672334374,2621462848,0.004323944000134361,685.7706435103163,2827,5691,3 +574485683,45217441,0.004481981999560958,214.6046386679047,2827,5691,3 +1826594887,549931434,0.01306698200005485,436.26736948173607,2827,5691,3 +7321870098,6389435552,0.0045035630000711535,164.6141667563423,2827,5691,3 +7115244215,4016874494,0.0021844929997314466,59.16033555162781,2827,5691,3 +2335713764,2611369851,0.008659335999254836,341.4414664124244,2827,5691,3 +2884684292,1828418192,0.005371036999349599,227.3872947428237,2827,5691,3 +2608394380,79952469,0.004148380000515317,323.70435471590326,2827,5691,3 +574485682,408478827,0.004000263000307314,186.9543818851861,2827,5691,3 +4955446039,2591134812,0.02313379499992152,623.3082344539869,2827,5691,3 +292981056,5576939244,0.00780612100061262,350.8540660979972,2827,5691,3 +2635713647,1820309645,0.0035686840001289966,158.25319591694605,2827,5691,3 +6047068261,549941827,0.006793865999497939,238.57914333266365,2827,5691,3 +2616315927,2611492275,0.00995773199974792,364.99875612623697,2827,5691,3 +79952492,430534359,0.012335537000581098,404.07151199153935,2827,5691,3 +7245276253,674511702,0.011887880000358564,361.98526836465845,2827,5691,3 +7115244212,4225277008,0.011752117000469298,346.17073362608573,2827,5691,3 +7286240209,408478755,0.023824191999665345,731.529341557396,2827,5691,3 +574546108,1830468180,0.023124328000449168,692.7399479939606,2827,5691,3 +600858466,1827520830,0.02558539399979054,None,2827,5691,3 +4226442916,549925965,0.017318748999969102,458.86593644477375,2827,5691,3 +2627469510,600866945,0.002440263000607956,169.10426681490915,2827,5691,3 +1672267773,4955446069,0.00013917000069341157,None,2827,5691,3 +2608597627,288944214,0.009315194000009797,320.059571405044,2827,5691,3 +418009820,318015012,0.006670095000117726,376.9674794697233,2827,5691,3 +7158827509,1828263557,0.006894396999996388,265.2832428627522,2827,5691,3 +7115126884,418009264,0.010392732000582328,331.629702693991,2827,5691,3 +574465009,5609333816,0.015511605999563471,429.3442689028079,2827,5691,3 +3123285391,2611369895,0.006960386000173457,213.00699592380232,2827,5691,3 +574482746,549941210,0.00527424699976109,207.27982913832062,2827,5691,3 diff --git a/evaluation/results/example/queries/charge.csv b/evaluation/results/example/queries/charge.csv index 778a20b..035fffb 100644 --- a/evaluation/results/example/queries/charge.csv +++ b/evaluation/results/example/queries/charge.csv @@ -1,101 +1,101 @@ start_node,target_node,query_time,trip_time,nodes,edges,charging_stations -2598984220,317431286,0.008180176002497319,None,2828,5691,4 -1574635376,2608394376,0.021258028002193896,None,2827,5691,4 -292485282,2639932980,0.013505564998922637,None,2828,5691,4 -7115183090,49109518,0.06775778799783438,None,2827,5691,4 -563188714,2616315920,0.005833523002365837,None,2828,5691,4 -2705157118,3299068955,0.007134575000236509,None,2827,5691,4 -3462099369,1935264851,0.007206661000964232,None,2828,5691,4 -1827520760,1927634075,0.018673054000828415,None,2827,5691,4 -7286135582,318014975,0.018709760002820985,None,2828,5691,4 -1949865714,1929118103,0.005620900003123097,None,2827,5691,4 -7321855875,7286135544,0.005817837998620234,None,2828,5691,4 -7031746253,1362941693,0.006871140998555347,None,2827,5691,4 -549928581,7042580423,0.02950502699968638,None,2828,5691,4 -306636859,3123285393,0.012904035997053143,None,2827,5691,4 -1828263505,7245276253,0.010383671997260535,None,2828,5691,4 -3111465609,333265684,0.015193104001809843,None,2827,5691,4 -574465020,7158827509,0.012436743996659061,50.69540952494169,2828,5691,4 -4955446038,2701786783,0.005120448000525357,None,2827,5691,4 -1505057722,2598982820,0.020811553000385175,None,2828,5691,4 -6417387121,45217575,0.013508068001101492,None,2827,5691,4 -3307706690,2608500686,0.005230446000496158,None,2828,5691,4 -508823988,294921054,0.010769991000415757,None,2827,5691,4 -1672267516,1253890971,0.004756539001391502,None,2828,5691,4 -1827268706,306636851,0.02145381899754284,None,2827,5691,4 -408478755,1768859071,0.0048011839971877635,None,2828,5691,4 -1574635374,600855062,0.004588548999890918,None,2827,5691,4 -2598983963,317766814,0.03134544000204187,None,2828,5691,4 -321209227,646729161,0.012163670999143505,None,2827,5691,4 -6807158096,3123285424,0.015652748999855248,None,2828,5691,4 -549943301,2598987933,0.02455500900032348,35.523732987539006,2827,5691,4 -1505052514,333265696,0.007645136000064667,None,2828,5691,4 -549931432,2604686222,0.012557174999528797,None,2827,5691,4 -318015042,288947631,0.013099121999402996,None,2828,5691,4 -7257113598,7031883144,0.014018231002410175,None,2827,5691,4 -6448459782,4016874494,0.04255742100212956,131.90751888540956,2828,5691,4 -473666790,418009807,0.01084802699915599,None,2827,5691,4 -2709966866,7140363810,0.006677566001599189,None,2828,5691,4 -4955446021,6053177179,0.0077450270000554156,None,2827,5691,4 -574505825,7286135580,0.014772022001125151,None,2828,5691,4 -3152652398,2632841195,0.007683657000598032,16.05410064430767,2827,5691,4 -6389441585,549931439,0.026403526000649435,None,2828,5691,4 -4955445788,2598984696,0.00579772499986575,None,2827,5691,4 -2635713649,34911573,0.06317204700098955,None,2828,5691,4 -2554184488,288944214,0.008746649000386242,None,2827,5691,4 -418009813,574496336,0.0061847219985793345,None,2828,5691,4 -3462099513,365064191,0.02295334200243815,None,2827,5691,4 -4321209903,288947635,0.026310897002986167,None,2828,5691,4 -2621360530,1362941667,0.00589794200277538,None,2827,5691,4 -2621386740,426948337,0.007500421997974627,None,2828,5691,4 -360747463,1253890891,0.014226000999769894,None,2827,5691,4 -90713483,1828418233,0.013401329000771511,67.6729183253639,2828,5691,4 -318015042,4016874623,0.027334361999237444,None,2827,5691,4 -5095519274,6001542005,0.017446650999772828,None,2828,5691,4 -574475518,2621506083,0.022026691000064602,None,2827,5691,4 -292728423,4845192812,0.009922258002916351,None,2828,5691,4 -7245276253,469718545,0.05542676899858634,None,2827,5691,4 -2600456373,474997349,0.027136166998388944,None,2828,5691,4 -430534355,1830470690,0.005587194998952327,3.5819980124555086,2827,5691,4 -318261957,2616315925,0.007042051001917571,None,2828,5691,4 -6908174001,600858234,0.009862457001872826,None,2827,5691,4 -45217432,317839009,0.014329842000734061,None,2828,5691,4 -4016874515,2598981737,0.05928631699862308,None,2827,5691,4 -34053772,2709164536,0.019356193002749933,None,2828,5691,4 -2614897350,410488856,0.024427955999271944,None,2827,5691,4 -574482753,7028725556,0.00775097400037339,None,2828,5691,4 -408478763,2612706786,0.005300780998368282,None,2827,5691,4 -674511701,360747493,0.0075798539983225055,None,2828,5691,4 -549931430,2608394482,0.028289874997426523,None,2827,5691,4 -2613167250,405229458,0.008100540002487833,None,2828,5691,4 -5576939248,2611370483,0.01708006900298642,None,2827,5691,4 -2696567034,5609333812,0.008594047001679428,None,2828,5691,4 -34053459,2605041420,0.005617404000076931,None,2827,5691,4 -469872413,2612700811,0.0057720000004337635,None,2828,5691,4 -7202546042,426948337,0.021323707998817554,None,2827,5691,4 -508824243,317839542,0.015900566999334842,None,2828,5691,4 -1828269035,549920915,0.006274672003200976,None,2827,5691,4 -2952146882,549938445,0.01221945900033461,None,2828,5691,4 -317767230,7030602781,0.02184277600099449,45.661832779945314,2827,5691,4 -7030602779,600861362,0.07216341800085502,None,2828,5691,4 -574546116,665115012,0.013652434001414804,None,2827,5691,4 -1988057398,2637079129,0.005324505000317004,None,2828,5691,4 -4955446046,7182110440,0.0063468920016021,None,2827,5691,4 -3211622692,318260724,0.014908343997376505,None,2828,5691,4 -574457822,3111465610,0.02582829099992523,None,2827,5691,4 -474997016,3123285422,0.022026119000656763,None,2828,5691,4 -4226442919,3522264443,0.01695801899768412,None,2827,5691,4 -7140363801,333265692,0.005513084997801343,None,2828,5691,4 -1828263512,17689717,0.009005162999528693,None,2827,5691,4 -574449258,1929118240,0.02272072200139519,None,2828,5691,4 -365070092,3211622686,0.02208552999945823,None,2827,5691,4 -574465023,2616462233,0.018754356999124866,123.32236605762252,2828,5691,4 -1362941674,7140339574,0.0625884090004547,None,2827,5691,4 -646729161,3123285391,0.010390056999312947,None,2828,5691,4 -1934201756,2554184498,0.0054623450014332775,None,2827,5691,4 -2623041440,4955446059,0.024829889996908605,None,2828,5691,4 -288947629,6448462033,0.009179304997815052,None,2827,5691,4 -1672340376,1362941687,0.005026917999202851,None,2828,5691,4 -6943345426,7081828735,0.009698408000986092,None,2827,5691,4 -317840788,318266812,0.06360204099837574,None,2828,5691,4 -473666764,360747431,0.02410455099743558,None,2827,5691,4 +7321902574,318014974,0.816606456000045,1792.648905540409,2828,5691,3 +4016874515,2611369730,0.05695069000012154,113.40853811212274,2827,5691,3 +7182110441,268980011,0.023140358999626187,None,2828,5691,3 +1934188724,34911575,0.32412717399984103,None,2827,5691,3 +1867147194,549947326,1.0531797159992493,None,2828,5691,3 +418009253,1411856646,0.023896833999970113,None,2827,5691,3 +6448459754,2608429407,0.08569430400075362,110.63446581791817,2828,5691,3 +1821291294,318261953,0.8421148419993187,9576.358960120844,2827,5691,3 +1927634061,360747579,0.7470106589998977,None,2828,5691,3 +79954921,2614897354,0.01227395899968542,None,2827,5691,3 +1934189119,563194918,0.07671072499942966,243.91394290107357,2828,5691,3 +408478784,2614897352,0.09311294800045289,None,2827,5691,3 +3111465595,474997347,0.2229279070006669,233.37360027751848,2828,5691,3 +1672267587,7115310188,0.012990934000299603,None,2827,5691,3 +426948340,2623041441,0.03597513000022445,None,2828,5691,3 +7030602777,2614920443,0.42990678400019533,None,2827,5691,3 +2611494658,7074500839,0.6106054279998716,None,2828,5691,3 +6448461998,2604687802,0.7877546489999077,None,2827,5691,3 +317767227,748845499,0.5888809139996738,None,2828,5691,3 +7081828735,1757613834,0.2787895599994954,None,2827,5691,3 +600861362,34053452,0.1160973930000182,257.2835741707556,2828,5691,3 +7030623427,5609334121,0.2116003549999732,19699.075181768025,2827,5691,3 +793260945,1935264851,0.4287361090000559,None,2828,5691,3 +2616315923,7257113601,0.1145265790000849,232.54030844332127,2827,5691,3 +1827520762,426930253,0.21864520799954335,None,2828,5691,3 +2997117857,45217462,0.011323332999381819,239.69584582112356,2827,5691,3 +7074500836,318015069,0.24373853799988865,18499.671678755098,2828,5691,3 +1672334351,2997117873,0.006136222000350244,None,2827,5691,3 +5113940071,574546136,0.0067075360002490925,38.36680561831532,2828,5691,3 +3307706662,408478842,0.006063058000108867,106.17669377184302,2827,5691,3 +365065394,2619115981,0.08204879600089043,211.22096795741354,2828,5691,3 +2973923689,2604686273,0.055503057000350964,314.30553801234936,2827,5691,3 +5576943376,549938448,0.8836931559999357,None,2828,5691,3 +7140363797,4475752956,0.009287233000577544,None,2827,5691,3 +2608501043,549944087,0.9896497019999515,None,2828,5691,3 +7115183094,1821291310,0.16703532399969845,166.72662919095825,2827,5691,3 +4016874408,469720334,0.6323797390004984,None,2828,5691,3 +7115183090,508823959,0.07809145000010176,99.25054650686562,2827,5691,3 +2598984220,2639898818,0.1919862570002806,317.989681778846,2828,5691,3 +1934189313,34053448,0.062292321999848355,None,2827,5691,3 +306639025,2608786068,0.03854399600004399,None,2828,5691,3 +549931420,2635713653,0.45712342700062436,None,2827,5691,3 +1929118250,7246644040,0.5446669550001388,None,2828,5691,3 +474997344,321209230,0.5101050759994905,25721.375123146114,2827,5691,3 +4383156579,318014986,0.2736173040002541,15552.042241115294,2828,5691,3 +2701786796,7321902570,0.44951088200014055,None,2827,5691,3 +418009817,408478815,0.3063651310003479,None,2828,5691,3 +665115010,7180800494,0.13378255800034822,121.99627562066787,2827,5691,3 +7286240204,7207579520,0.7944291719995817,None,2828,5691,3 +7286240202,3273201483,0.10878032700020412,151.17570520208938,2827,5691,3 +34053458,1672267572,0.018573579999610956,None,2828,5691,3 +6448461991,1827520765,0.4178299609993701,None,2827,5691,3 +2600451785,2705157134,0.295613293000315,None,2828,5691,3 +1672267690,306639024,0.029936169999928097,None,2827,5691,3 +317767228,574482753,0.5675544059995445,None,2828,5691,3 +6448461999,317839537,0.0191387830000167,113.79275358739032,2827,5691,3 +45217495,3996162743,0.9394159049998052,None,2828,5691,3 +288947123,7030602775,0.33305940499940334,None,2827,5691,3 +318260942,1672267832,0.3947207510000226,None,2828,5691,3 +4955446038,6603016874,0.5525475649992586,None,2827,5691,3 +1574635372,7140363795,0.0061973400006536394,None,2828,5691,3 +2611404223,1636935570,1.0060662539999612,None,2827,5691,3 +7182110439,45217473,0.025666359999377164,None,2828,5691,3 +7115244209,418009812,0.9239453850004793,None,2827,5691,3 +2604685993,288944217,2.4160380559997066,None,2828,5691,3 +2600670536,665115005,0.08823915300035878,346.37375978016064,2827,5691,3 +306636853,426948333,0.8456364619996748,None,2828,5691,3 +7165728796,549947346,1.1368291119997593,None,2827,5691,3 +34053442,79952473,0.11454584500006604,159.72842896428756,2828,5691,3 +549943303,292484626,0.3857124339992879,None,2827,5691,3 +1672334374,2621462848,0.005592903999968257,None,2828,5691,3 +574485683,45217441,0.09150863600007142,214.6046386679047,2827,5691,3 +1826594887,549931434,0.4621335629999521,None,2828,5691,3 +7321870098,6389435552,0.13617897600033757,164.6141667563423,2827,5691,3 +7115244215,4016874494,0.04243734299961943,59.16033555162781,2828,5691,3 +2335713764,2611369851,0.24678136299917242,18481.74054420309,2827,5691,3 +2884684292,1828418192,0.25409771999966324,227.45445690314511,2828,5691,3 +2608394380,79952469,0.1772169229998326,323.70435471590326,2827,5691,3 +574485682,408478827,0.06435229900034756,186.9543818851861,2828,5691,3 +4955446039,2591134812,0.5674075529996117,None,2827,5691,3 +292981056,5576939244,0.3297397569995155,None,2828,5691,3 +2635713647,1820309645,0.11047373000019434,158.25319591694605,2827,5691,3 +6047068261,549941827,0.1659991420001461,238.57914333266365,2828,5691,3 +2616315927,2611492275,0.35699719700005517,None,2827,5691,3 +79952492,430534359,0.7037360610001997,None,2828,5691,3 +7245276253,674511702,0.48892663400056335,2965.5782504425006,2827,5691,3 +7115244212,4225277008,0.4287897479998719,None,2828,5691,3 +7286240209,408478755,0.8902888889997485,None,2827,5691,3 +574546108,1830468180,56.450571792999654,None,2828,5691,3 +600858466,1827520830,0.705039191000651,None,2827,5691,3 +4226442916,549925965,0.7127105130002747,None,2828,5691,3 +2627469510,600866945,0.08905787500043516,169.10426681490915,2827,5691,3 +1672267773,4955446069,0.004978612000741123,None,2828,5691,3 +2608597627,288944214,0.8749616969998897,7241.99317190265,2827,5691,3 +418009820,318015012,0.07547216999955708,376.9674794697233,2828,5691,3 +7158827509,1828263557,0.12232587600010447,265.2832428627522,2827,5691,3 +7115126884,418009264,0.7031070630000613,None,2828,5691,3 +574465009,5609333816,0.372224918000029,None,2827,5691,3 +3123285391,2611369895,0.13805532100013806,213.00699592380232,2828,5691,3 +574482746,549941210,0.09052957499989134,207.27982913832062,2827,5691,3 diff --git a/evaluation/results/example/queries/classic.csv b/evaluation/results/example/queries/classic.csv index 0e3c393..977d13b 100644 --- a/evaluation/results/example/queries/classic.csv +++ b/evaluation/results/example/queries/classic.csv @@ -1,101 +1,101 @@ start_node,target_node,query_time,trip_time,nodes,edges,charging_stations,dijkstra_rank -2598984220,317431286,0.008187216997612268,498.1140111598792,2827,5691,4,0 -1574635376,2608394376,0.0001609639984962996,None,2827,5691,4,0 -292485282,2639932980,0.0068304070009617135,288.6212594295983,2827,5691,4,0 -7115183090,49109518,0.01066912700116518,904.9345063361109,2827,5691,4,0 -563188714,2616315920,0.002552830999775324,441.49586624662686,2827,5691,4,0 -2705157118,3299068955,0.004320370997447753,344.81142283925794,2827,5691,4,0 -3462099369,1935264851,0.010293547999026487,1063.5350428566937,2827,5691,4,0 -1827520760,1927634075,0.0001419260006514378,None,2827,5691,4,0 -7286135582,318014975,0.0028860759994131513,291.32161516417983,2827,5691,4,0 -1949865714,1929118103,0.0070300959996529855,247.41047878926767,2827,5691,4,0 -7321855875,7286135544,0.0018392879974271636,203.13436437693898,2827,5691,4,0 -7031746253,1362941693,0.0038844900009280536,567.6960773066983,2827,5691,4,0 -549928581,7042580423,0.00968421200013836,652.1459029950373,2827,5691,4,0 -306636859,3123285393,0.0006229690006875899,134.30855985472655,2827,5691,4,0 -1828263505,7245276253,0.0019597450009314343,172.3946058972845,2827,5691,4,0 -3111465609,333265684,0.0010656390004442073,158.3747300421578,2827,5691,4,0 -574465020,7158827509,0.00021219200061750598,50.69540952494169,2827,5691,4,0 -4955446038,2701786783,0.00809012800164055,474.42019948624187,2827,5691,4,0 -1505057722,2598982820,0.0011639390031632502,213.63162923041278,2827,5691,4,0 -6417387121,45217575,0.005168483003217261,511.57995760781023,2827,5691,4,0 -3307706690,2608500686,0.008918706997064874,704.3773911683422,2827,5691,4,0 -508823988,294921054,0.009191697998176096,445.6549504206056,2827,5691,4,0 -1672267516,1253890971,0.008897299001546344,463.9904522865263,2827,5691,4,0 -1827268706,306636851,0.004441869998117909,307.2300820908875,2827,5691,4,0 -408478755,1768859071,0.008488208000926534,697.8556376483256,2827,5691,4,0 -1574635374,600855062,0.0059117839991813526,322.93290424355115,2827,5691,4,0 -2598983963,317766814,0.002923186002590228,296.63342740485876,2827,5691,4,0 -321209227,646729161,0.005924624001636403,442.53836425358986,2827,5691,4,0 -6807158096,3123285424,0.002905574998294469,202.045423495865,2827,5691,4,0 -549943301,2598987933,0.00014319199908641167,35.523732987539006,2827,5691,4,0 -1505052514,333265696,0.0012539979979919735,226.88367088862458,2827,5691,4,0 -549931432,2604686222,0.0004224229996907525,86.4933235550859,2827,5691,4,0 -318015042,288947631,0.007451342997228494,421.1855259966528,2827,5691,4,0 -7257113598,7031883144,0.0058611109998309985,481.6685944984319,2827,5691,4,0 -6448459782,4016874494,0.0007582449979963712,131.90751888540956,2827,5691,4,0 -473666790,418009807,0.009337532999779796,616.8422429539488,2827,5691,4,0 -2709966866,7140363810,0.005812201998196542,666.1717265390163,2827,5691,4,0 -4955446021,6053177179,0.003093438997893827,257.7677435214174,2827,5691,4,0 -574505825,7286135580,0.007588347998535028,502.49813461242684,2827,5691,4,0 -3152652398,2632841195,0.00013957900227978826,16.05410064430767,2827,5691,4,0 -6389441585,549931439,0.003053469001315534,286.0696115473284,2827,5691,4,0 -4955445788,2598984696,0.005824555999424774,710.6103593111196,2827,5691,4,0 -2635713649,34911573,0.00760829299906618,None,2827,5691,4,0 -2554184488,288944214,0.0030421629999182187,452.6269758518667,2827,5691,4,0 -418009813,574496336,0.005539825997402659,488.8373405449547,2827,5691,4,0 -3462099513,365064191,0.003426727998885326,241.9305441128864,2827,5691,4,0 -4321209903,288947635,0.0005009640008211136,89.32726022221709,2827,5691,4,0 -2621360530,1362941667,0.0029625880015373696,404.88978534474785,2827,5691,4,0 -2621386740,426948337,0.005256820000795415,704.90873165616,2827,5691,4,0 -360747463,1253890891,0.0007362549986282829,115.8616723797326,2827,5691,4,0 -90713483,1828418233,0.0006892179990245495,67.6729183253639,2827,5691,4,0 -318015042,4016874623,0.0008180189979611896,146.82532607152257,2827,5691,4,0 -5095519274,6001542005,0.002089203000650741,394.8821819040191,2827,5691,4,0 -574475518,2621506083,0.002484353000909323,296.1749244866103,2827,5691,4,0 -292728423,4845192812,0.003259769997384865,324.25303154204727,2827,5691,4,0 -7245276253,469718545,0.002734369998506736,225.2174804198681,2827,5691,4,0 -2600456373,474997349,0.0027447590000519995,511.11398598162265,2827,5691,4,0 -430534355,1830470690,3.051900057471357e-05,3.5819980124555086,2827,5691,4,0 -318261957,2616315925,0.004263339000317501,478.54912090204874,2827,5691,4,0 -6908174001,600858234,0.005954239000857342,676.669550658477,2827,5691,4,0 -45217432,317839009,0.002452248001645785,214.85683549218038,2827,5691,4,0 -4016874515,2598981737,0.00666467399787507,414.03216869826895,2827,5691,4,0 -34053772,2709164536,0.0038947239991102833,611.2709913034893,2827,5691,4,0 -2614897350,410488856,0.004972164999344386,490.60053969987376,2827,5691,4,0 -574482753,7028725556,0.0061100989987608045,768.0748904497931,2827,5691,4,0 -408478763,2612706786,0.0038842629983264487,542.9635549695838,2827,5691,4,0 -674511701,360747493,0.002431435998005327,540.9390299817543,2827,5691,4,0 -549931430,2608394482,0.004227809997246368,291.48713827057804,2827,5691,4,0 -2613167250,405229458,0.0005703520000679418,150.98464174372822,2827,5691,4,0 -5576939248,2611370483,0.0018948460019601043,247.59474539609872,2827,5691,4,0 -2696567034,5609333812,0.004291510002076393,544.8291915663265,2827,5691,4,0 -34053459,2605041420,0.005893408000702038,745.9962543239784,2827,5691,4,0 -469872413,2612700811,0.0068368920001375955,531.0346088911808,2827,5691,4,0 -7202546042,426948337,0.0013824410016241018,399.65304499593276,2827,5691,4,0 -508824243,317839542,0.002436760998534737,250.2341684437973,2827,5691,4,0 -1828269035,549920915,0.0024375350003538188,229.8196777256521,2827,5691,4,0 -2952146882,549938445,0.0009131609986070544,138.30182936835243,2827,5691,4,0 -317767230,7030602781,0.00046262300020316616,45.661832779945314,2827,5691,4,0 -7030602779,600861362,0.001837858999351738,194.54897286425881,2827,5691,4,0 -574546116,665115012,0.004715062001196202,518.410521468413,2827,5691,4,0 -1988057398,2637079129,0.0065310130012221634,1144.52259390045,2827,5691,4,0 -4955446046,7182110440,0.003659085999970557,380.9316035609116,2827,5691,4,0 -3211622692,318260724,0.002272661997267278,265.28715514357395,2827,5691,4,0 -574457822,3111465610,0.0018534789996920153,187.30089552278895,2827,5691,4,0 -474997016,3123285422,0.0019756779984163586,238.8794603618747,2827,5691,4,0 -4226442919,3522264443,0.0014297010020527523,190.36745785565165,2827,5691,4,0 -7140363801,333265692,0.004980473000614438,666.7530396460336,2827,5691,4,0 -1828263512,17689717,0.005680689002474537,None,2827,5691,4,0 -574449258,1929118240,0.00564690899773268,529.8540594348103,2827,5691,4,0 -365070092,3211622686,0.0010198710006079637,294.8068842064823,2827,5691,4,0 -574465023,2616462233,0.0006938559999980498,123.32236605762252,2827,5691,4,0 -1362941674,7140339574,0.0022993179991317447,187.11648556273997,2827,5691,4,0 -646729161,3123285391,0.0009296719981648494,108.17611080310326,2827,5691,4,0 -1934201756,2554184498,0.0068787950003752485,818.7191029257017,2827,5691,4,0 -2623041440,4955446059,0.005505220000486588,583.5139470626206,2827,5691,4,0 -288947629,6448462033,0.004556083000352373,410.99989791340255,2827,5691,4,0 -1672340376,1362941687,5.44440008525271e-05,None,2827,5691,4,0 -6943345426,7081828735,0.006068169997888617,606.2296135599523,2827,5691,4,0 -317840788,318266812,0.003152984001644654,360.331834453331,2827,5691,4,0 -473666764,360747431,0.0013173730003472883,286.04783495751815,2827,5691,4,0 +7321902574,318014974,0.002519671999834827,238.1110904996911,2827,5691,3,0 +4016874515,2611369730,0.0011238140004934394,113.40853811212274,2827,5691,3,0 +7182110441,268980011,0.001713784000457963,575.546920845741,2827,5691,3,0 +1934188724,34911575,0.005819557999529934,None,2827,5691,3,0 +1867147194,549947326,0.0037802899996677297,306.3977004462799,2827,5691,3,0 +418009253,1411856646,0.005890318000638217,926.5828722425748,2827,5691,3,0 +6448459754,2608429407,0.0015214900004139054,110.63446581791817,2827,5691,3,0 +1821291294,318261953,0.003146213999571046,366.3184015404222,2827,5691,3,0 +1927634061,360747579,0.006537439000567247,465.50083809477644,2827,5691,3,0 +79954921,2614897354,0.0034732479998638155,626.9765430725013,2827,5691,3,0 +1934189119,563194918,0.0007917940001789248,243.91394290107357,2827,5691,3,0 +408478784,2614897352,0.0015355779996752972,376.06559393330286,2827,5691,3,0 +3111465595,474997347,0.0017485260004832526,233.37360027751848,2827,5691,3,0 +1672267587,7115310188,2.4167999981727917e-05,None,2827,5691,3,0 +426948340,2623041441,0.00504699500015704,607.4759695626486,2827,5691,3,0 +7030602777,2614920443,0.004175713999757136,309.14324380214833,2827,5691,3,0 +2611494658,7074500839,0.006150950999654015,649.6622428768856,2827,5691,3,0 +6448461998,2604687802,0.0036673259992312524,369.2373455358261,2827,5691,3,0 +317767227,748845499,0.005325655999513401,438.7724254643551,2827,5691,3,0 +7081828735,1757613834,0.004511068000283558,638.132348548364,2827,5691,3,0 +600861362,34053452,0.0018471389994374476,257.2835741707556,2827,5691,3,0 +7030623427,5609334121,0.0023055800002111937,505.63577043459526,2827,5691,3,0 +793260945,1935264851,0.006104363999838824,982.3373940665655,2827,5691,3,0 +2616315923,7257113601,0.001763603000654257,232.54030844332127,2827,5691,3,0 +1827520762,426930253,0.007004467000115255,555.1219663447,2827,5691,3,0 +2997117857,45217462,0.0002233479999631527,239.69584582112356,2827,5691,3,0 +7074500836,318015069,0.0019508490004227497,358.3313926632318,2827,5691,3,0 +1672334351,2997117873,0.005116002999784541,619.7320443863234,2827,5691,3,0 +5113940071,574546136,0.00014604399984818883,38.36680561831532,2827,5691,3,0 +3307706662,408478842,9.085800047614612e-05,106.17669377184302,2827,5691,3,0 +365065394,2619115981,0.0015626829999746406,211.22096795741354,2827,5691,3,0 +2973923689,2604686273,0.0013597130000562174,314.30553801234936,2827,5691,3,0 +5576943376,549938448,0.003950379999878351,378.7504835821481,2827,5691,3,0 +7140363797,4475752956,0.001974978000362171,405.1173694042988,2827,5691,3,0 +2608501043,549944087,0.002876131999983045,309.83263677334804,2827,5691,3,0 +7115183094,1821291310,0.0016394470003433526,166.72662919095825,2827,5691,3,0 +4016874408,469720334,0.004805833000318671,474.5248341109552,2827,5691,3,0 +7115183090,508823959,0.001090603999728046,99.25054650686562,2827,5691,3,0 +2598984220,2639898818,0.0017905220001921407,315.22936375978804,2827,5691,3,0 +1934189313,34053448,0.005262915999992401,996.5041118441444,2827,5691,3,0 +306639025,2608786068,0.0017418150000594324,335.3712680198829,2827,5691,3,0 +549931420,2635713653,0.005793508000351721,443.3356339909103,2827,5691,3,0 +1929118250,7246644040,0.005666458999257884,792.7725145604651,2827,5691,3,0 +474997344,321209230,0.004416523000145389,360.1032536260311,2827,5691,3,0 +4383156579,318014986,0.001728482000544318,334.8287484267631,2827,5691,3,0 +2701786796,7321902570,0.004073723000146856,396.4678926102016,2827,5691,3,0 +418009817,408478815,0.0022180609994393308,393.2077751296899,2827,5691,3,0 +665115010,7180800494,0.0014712470001541078,121.99627562066787,2827,5691,3,0 +7286240204,7207579520,0.003412189000300714,444.57943336659633,2827,5691,3,0 +7286240202,3273201483,0.0010125459994014818,151.17570520208938,2827,5691,3,0 +34053458,1672267572,0.004387083999972674,534.9695327831129,2827,5691,3,0 +6448461991,1827520765,0.006571904000338691,None,2827,5691,3,0 +2600451785,2705157134,0.00510032400052296,391.70762990375385,2827,5691,3,0 +1672267690,306639024,3.9774000470060855e-05,None,2827,5691,3,0 +317767228,574482753,0.004602334000082919,360.4443894533518,2827,5691,3,0 +6448461999,317839537,0.00046482899961119983,113.79275358739032,2827,5691,3,0 +45217495,3996162743,0.005132786000103806,370.86620593338074,2827,5691,3,0 +288947123,7030602775,0.0030040209994695033,380.7827532273404,2827,5691,3,0 +318260942,1672267832,0.0074371099999552825,None,2827,5691,3,0 +4955446038,6603016874,0.0030983750002633315,338.336413426195,2827,5691,3,0 +1574635372,7140363795,9.686800058261724e-05,None,2827,5691,3,0 +2611404223,1636935570,0.004732641999908083,477.29034631823833,2827,5691,3,0 +7182110439,45217473,0.0033237799998460105,588.6851099661361,2827,5691,3,0 +7115244209,418009812,0.004428059000019857,389.59809435549516,2827,5691,3,0 +2604685993,288944217,0.005145299000105297,517.7769043458792,2827,5691,3,0 +2600670536,665115005,0.0010103529994012206,346.37375978016064,2827,5691,3,0 +306636853,426948333,0.005547469000703131,572.6741026406311,2827,5691,3,0 +7165728796,549947346,0.0029472710002664826,397.60081105225186,2827,5691,3,0 +34053442,79952473,0.0013936549994468805,159.72842896428756,2827,5691,3,0 +549943303,292484626,0.005738058999668283,None,2827,5691,3,0 +1672334374,2621462848,0.0015659170003345935,685.7706435103163,2827,5691,3,0 +574485683,45217441,0.0011523289995238883,214.6046386679047,2827,5691,3,0 +1826594887,549931434,0.0038064310001573176,436.26736948173607,2827,5691,3,0 +7321870098,6389435552,0.001359501000479213,164.6141667563423,2827,5691,3,0 +7115244215,4016874494,0.0006750539996573934,59.16033555162781,2827,5691,3,0 +2335713764,2611369851,0.0022982750006121933,341.4414664124244,2827,5691,3,0 +2884684292,1828418192,0.0025121770004261634,227.3872947428237,2827,5691,3,0 +2608394380,79952469,0.0017890930002977257,323.70435471590326,2827,5691,3,0 +574485682,408478827,0.001031939999847964,186.9543818851861,2827,5691,3,0 +4955446039,2591134812,0.005635057000290544,623.3082344539869,2827,5691,3,0 +292981056,5576939244,0.0030401649992199964,350.8540660979972,2827,5691,3,0 +2635713647,1820309645,0.001137377999839373,158.25319591694605,2827,5691,3,0 +6047068261,549941827,0.0016248410001935554,238.57914333266365,2827,5691,3,0 +2616315927,2611492275,0.0031081359993549995,364.99875612623697,2827,5691,3,0 +79952492,430534359,0.004308175000005576,404.07151199153935,2827,5691,3,0 +7245276253,674511702,0.004105555000023742,361.98526836465845,2827,5691,3,0 +7115244212,4225277008,0.003819587999714713,346.17073362608573,2827,5691,3,0 +7286240209,408478755,0.005415741999968304,731.529341557396,2827,5691,3,0 +574546108,1830468180,0.005615375999695971,692.7399479939606,2827,5691,3,0 +600858466,1827520830,0.00601139299942588,None,2827,5691,3,0 +4226442916,549925965,0.004591696000716183,458.86593644477375,2827,5691,3,0 +2627469510,600866945,0.00184673700005078,169.10426681490915,2827,5691,3,0 +1672267773,4955446069,3.999399996246211e-05,None,2827,5691,3,0 +2608597627,288944214,0.0027223360002608388,320.059571405044,2827,5691,3,0 +418009820,318015012,0.0019810060002782848,376.9674794697233,2827,5691,3,0 +7158827509,1828263557,0.002145832000678638,265.2832428627522,2827,5691,3,0 +7115126884,418009264,0.0031014950000098906,331.629702693991,2827,5691,3,0 +574465009,5609333816,0.0041591769995648065,429.3442689028079,2827,5691,3,0 +3123285391,2611369895,0.0019373100003576837,213.00699592380232,2827,5691,3,0 +574482746,549941210,0.0014043890005268622,207.27982913832062,2827,5691,3,0 diff --git a/evaluation/results/example/queries/gasstation.csv b/evaluation/results/example/queries/gasstation.csv index 049b294..3f1a638 100644 --- a/evaluation/results/example/queries/gasstation.csv +++ b/evaluation/results/example/queries/gasstation.csv @@ -1,101 +1,24 @@ start_node,target_node,query_time,trip_time,nodes,edges,charging_stations,time_contracted_graph,time_state_graph -2598984220,317431286,0.042276075000700075,498.1140111598792,2827,5691,3,0.02612539600158925,0.00022654100030194968 -1574635376,2608394376,0.02502237200314994,None,2827,5691,3,0.024410483001702232,0.00014671100143459626 -292485282,2639932980,0.032847981001395965,288.6212594295983,2827,5691,3,0.02465888000006089,0.00013022400162299164 -7115183090,49109518,0.10543369100196287,None,2827,5691,3,0.024544266001612414,0.00013008800306124613 -563188714,2616315920,0.0282794679988001,441.49586624662686,2827,5691,3,0.023812198000086937,0.00013296199904289097 -2705157118,3299068955,0.029098611001245445,344.81142283925794,2827,5691,3,0.02400959800070268,0.00013027100067120045 -3462099369,1935264851,0.10879190799823846,None,2827,5691,3,0.023196269998152275,0.00012858799891546369 -1827520760,1927634075,0.024613869998574955,None,2827,5691,3,0.02391307899961248,0.0001408280004397966 -7286135582,318014975,0.031734542000776855,291.32161516417983,2827,5691,3,0.024036185001023114,0.00013172800026950426 -1949865714,1929118103,0.03250576600112254,247.41047878926767,2827,5691,3,0.02430951700080186,0.000129755000671139 -7321855875,7286135544,0.02856469600010314,203.13436437693898,2827,5691,3,0.024096420002024388,0.00013256499732960947 -7031746253,1362941693,0.035447548998490674,567.6960773066983,2827,5691,3,0.02371362399935606,0.00013068599946564063 -549928581,7042580423,0.12114347600072506,None,2827,5691,3,0.02482005000274512,0.00018649999765329994 -306636859,3123285393,0.02678363299855846,134.30855985472655,2827,5691,3,0.025068437000300037,0.00016796899944893084 -1828263505,7245276253,0.026912877001450397,172.3946058972845,2827,5691,3,0.023743199002637994,0.00013022999701206572 -3111465609,333265684,0.027224161000049207,158.3747300421578,2827,5691,3,0.023699797999142902,0.00013145599950803444 -574465020,7158827509,0.02451522599585587,50.69540952494169,2827,5691,3,0.023794642998836935,0.00013086599938105792 -4955446038,2701786783,0.043220919000305,474.42019948624187,2827,5691,3,0.027178383999853395,0.00020227200002409518 -1505057722,2598982820,0.025321151999378344,213.63162923041278,2827,5691,3,0.023105471998860594,0.00012981899999431334 -6417387121,45217575,0.039293615001952276,511.57995760781023,2827,5691,3,0.02367664200210129,0.00015038499986985698 -3307706690,2608500686,0.209684469999047,24742.559119734364,2827,5691,3,0.0443845939989842,0.00024026100072660483 -508823988,294921054,0.05452130499907071,445.6549504206056,2827,5691,3,0.03596596900024451,0.0002436579998175148 -1672267516,1253890971,0.05214218099717982,463.9904522865263,2827,5691,3,0.024084504999336787,0.00013771500016446225 -1827268706,306636851,0.063915946000634,307.2300820908875,2827,5691,3,0.047682315002020914,0.0002650359965628013 -408478755,1768859071,0.1860459159979655,54858.478484699735,2827,5691,3,0.045967697999003576,0.0002478620008332655 -1574635374,600855062,0.03292367100220872,322.93290424355115,2827,5691,3,0.025225121000403306,0.00014753000141354278 -2598983963,317766814,0.042491768992476864,296.63342740485876,2827,5691,3,0.029071484997984953,0.0002648979971127119 -321209227,646729161,0.06817621099980897,442.53836425358986,2827,5691,3,0.05043920100069954,0.0002550350000092294 -6807158096,3123285424,0.06127541499881772,202.045423495865,2827,5691,3,0.050061687998095294,0.0002503850009816233 -549943301,2598987933,0.04687722400194616,35.523732987539006,2827,5691,3,0.04580321899993578,0.00023641000007046387 -1505052514,333265696,0.051330194997717626,226.88367088862458,2827,5691,3,0.044925823000085074,0.0002522859977034386 -549931432,2604686222,0.052016783996805316,86.4933235550859,2827,5691,3,0.04930432299806853,0.00024924299941631034 -318015042,288947631,0.07891565099635045,421.1855259966528,2827,5691,3,0.050491611000325065,0.00023426199913956225 -7257113598,7031883144,0.07612812200022745,481.6685944984319,2827,5691,3,0.04874004299927037,0.0002568970012362115 -6448459782,4016874494,0.05312677099936991,131.90751888540956,2827,5691,3,0.04871241699947859,0.0002386679989285767 -473666790,418009807,0.21033150999937789,7237.621358907038,2827,5691,3,0.04875911800263566,0.0002493579995643813 -2709966866,7140363810,0.13560748100280762,10403.398566208132,2827,5691,3,0.036552887002471834,0.00014791600187891163 -4955446021,6053177179,0.035603660999186104,257.7677435214174,2827,5691,3,0.02866313699996681,0.00013347200001589954 -574505825,7286135580,0.03587911399881705,502.49813461242684,2827,5691,3,0.02321532900168677,0.000130749998788815 -3152652398,2632841195,0.025318888994661393,16.05410064430767,2827,5691,3,0.024955302997113904,0.00013186099749873392 -6389441585,549931439,0.0332952130047488,286.0696115473284,2827,5691,3,0.024250475002190797,0.00013609800225822255 -4955445788,2598984696,0.19080991900045774,14301.34473395243,2827,5691,3,0.023874270998931024,0.00013205600043875165 -2635713649,34911573,0.0971053480025148,None,2827,5691,3,0.04580549000093015,0.00024869800108717754 -2554184488,288944214,0.06897250700058066,452.6269758518667,2827,5691,3,0.04864492699925904,0.0002491650011506863 -418009813,574496336,0.06531908100077999,488.8373405449547,2827,5691,3,0.048711422001360916,0.00014795099923503585 -3462099513,365064191,0.0404399410035694,241.9305441128864,2827,5691,3,0.03644991400142317,0.00014536600065184757 -4321209903,288947635,0.029248424001707463,89.32726022221709,2827,5691,3,0.02698464400236844,0.0001498179990448989 -2621360530,1362941667,0.037620651004544925,404.88978534474785,2827,5691,3,0.02823518100194633,0.0001492770024924539 -2621386740,426948337,0.2415351660019951,18458.434029045413,2827,5691,3,0.03658536299917614,0.0001484990025346633 -360747463,1253890891,0.05129123999722651,115.8616723797326,2827,5691,3,0.048186755000642734,0.0002470779982104432 -90713483,1828418233,0.0532164849973924,67.6729183253639,2827,5691,3,0.04914040199946612,0.00024236500030383468 -318015042,4016874623,0.051894880994950654,146.82532607152257,2827,5691,3,0.046217121998779476,0.00015891599832684733 -5095519274,6001542005,0.0618195229981211,394.8821819040191,2827,5691,3,0.05200467400209163,0.00025152299713226967 -574475518,2621506083,0.060032460001821164,296.1749244866103,2827,5691,3,0.04660530799810658,0.00017216300329891965 -292728423,4845192812,0.06360029500137898,324.25303154204727,2827,5691,3,0.04478140200080816,0.0002652650000527501 -7245276253,469718545,0.04932073699819739,225.2174804198681,2827,5691,3,0.03702269099812838,0.00024437400134047493 -2600456373,474997349,0.036294464000093285,511.11398598162265,2827,5691,3,0.02658232199974009,0.00013334599861991592 -430534355,1830470690,0.03571396800180082,3.5819980124555086,2827,5691,3,0.03551292900010594,0.000145958001667168 -318261957,2616315925,0.06110411600093357,478.54912090204874,2827,5691,3,0.038274270002148114,0.0002577459999884013 -6908174001,600858234,0.17091138699834119,13045.53481380464,2827,5691,3,0.03817972499746247,0.00013393200060818344 -45217432,317839009,0.02850118600326823,214.85683549218038,2827,5691,3,0.02397998200103757,0.0001316720008617267 -4016874515,2598981737,0.05441371000051731,414.03216869826895,2827,5691,3,0.03305683099824819,0.00021097600256325677 -34053772,2709164536,0.12986579700009315,17269.037868168176,2827,5691,3,0.027068420000432525,0.00013286899775266647 -2614897350,410488856,0.037001697994128335,490.60053969987376,2827,5691,3,0.024741843997617252,0.00013104099707561545 -574482753,7028725556,0.1460951480003132,16427.532386083345,2827,5691,3,0.024953752999863354,0.00013120500079821795 -408478763,2612706786,0.03189900200231932,542.9635549695838,2827,5691,3,0.025356537000334356,0.00013355299961403944 -674511701,360747493,0.0341482889962208,540.9390299817543,2827,5691,3,0.025525667999318102,0.00013199299792177044 -549931430,2608394482,0.036105073002545396,291.48713827057804,2827,5691,3,0.026094094002473867,0.00017581300198799 -2613167250,405229458,0.027021646998036886,150.98464174372822,2827,5691,3,0.02527431099952082,0.00013304099775268696 -5576939248,2611370483,0.031118681003135862,247.59474539609872,2827,5691,3,0.025235213000996737,0.00013116600166540593 -2696567034,5609333812,0.04098827300185803,544.8291915663265,2827,5691,3,0.025695141001051525,0.00013136500274413265 -34053459,2605041420,0.13893630799793755,16686.743465059797,2827,5691,3,0.02505193399701966,0.0001327780009887647 -469872413,2612700811,0.04724072899989551,531.0346088911808,2827,5691,3,0.02813288900142652,0.0001322839998465497 -7202546042,426948337,0.028255796001758426,399.65304499593276,2827,5691,3,0.024184054000215838,0.00013037400276516564 -508824243,317839542,0.03214173200103687,250.2341684437973,2827,5691,3,0.023377393001283053,0.00013063199730822816 -1828269035,549920915,0.029996878998645116,229.8196777256521,2827,5691,3,0.024963100000604754,0.0001314289984293282 -2952146882,549938445,0.028604226998140803,138.30182936835243,2827,5691,3,0.025532285999361193,0.0001309809995291289 -317767230,7030602781,0.02625677299874951,45.661832779945314,2827,5691,3,0.024550326997996308,0.00022029799947631545 -7030602779,600861362,0.030182349000824615,194.54897286425881,2827,5691,3,0.02419876899875817,0.00016605400014668703 -574546116,665115012,0.04386719100511982,518.410521468413,2827,5691,3,0.02552339200337883,0.00013108900020597503 -1988057398,2637079129,0.11393830599990906,None,2827,5691,3,0.023645166998903733,0.00021378000019467436 -4955446046,7182110440,0.035406577997491695,380.9316035609116,2827,5691,3,0.02533617500012042,0.00013607999790110625 -3211622692,318260724,0.02851075200305786,265.28715514357395,2827,5691,3,0.02469539999947301,0.00013140800001565367 -574457822,3111465610,0.028822402004152536,187.30089552278895,2827,5691,3,0.023860298002546187,0.00013067799955024384 -474997016,3123285422,0.026905212002020562,238.8794603618747,2827,5691,3,0.023201427000458352,0.0001300430012634024 -4226442919,3522264443,0.026737287997093517,190.36745785565165,2827,5691,3,0.02355267399980221,0.00012953999976161867 -7140363801,333265692,0.12152014699677238,6198.220372891225,2827,5691,3,0.03502359399863053,0.0001346319986623712 -1828263512,17689717,0.04820222300259047,None,2827,5691,3,0.023400581001624232,0.00013006199878873304 -574449258,1929118240,0.04400225700010196,529.8540594348103,2827,5691,3,0.02335751799910213,0.00013055200179223903 -365070092,3211622686,0.029530750998674193,294.8068842064823,2827,5691,3,0.024598091000370914,0.00013135699919075705 -574465023,2616462233,0.027308120996167418,123.32236605762252,2827,5691,3,0.024595079998107394,0.00013265300003695302 -1362941674,7140339574,0.032680847001756774,187.11648556273997,2827,5691,3,0.025111782000749372,0.00013098800263833255 -646729161,3123285391,0.027806364003481576,108.17611080310326,2827,5691,3,0.024714111001230776,0.00013271500210976228 -1934201756,2554184498,0.13463329600199359,27634.257539908027,2827,5691,3,0.0243021590031276,0.00013173100160202011 -2623041440,4955446059,0.04510627600029693,583.5139470626206,2827,5691,3,0.024096565000945702,0.00013219399988884106 -288947629,6448462033,0.0365435920029995,410.99989791340255,2827,5691,3,0.02539478999824496,0.0001305210025748238 -1672340376,1362941687,0.024774151996098226,None,2827,5691,3,0.02441362499666866,0.00017993599976762198 -6943345426,7081828735,0.12339878300190321,10439.257141159233,2827,5691,3,0.024439984998025466,0.00013186200158088468 -317840788,318266812,0.03649396800392424,360.331834453331,2827,5691,3,0.02438458400138188,0.0001390470024489332 -473666764,360747431,0.027765100996475667,286.04783495751815,2827,5691,3,0.02464001399857807,0.00019689599866978824 +318261951,318261959,0.038180532996193506,172.45882045633869,2827,5691,3,0.037711901000875514,0.00019447699742158875 +1828254502,2600722301,0.03250095799739938,267.023987254795,2827,5691,3,0.030721290000656154,0.0001709889984340407 +6448459779,563188710,0.0537844359932933,499.28016704624633,2827,5691,3,0.03073318299720995,0.00015049200010253116 +34053445,7030617900,0.03731665799568873,197.60092044964952,2827,5691,3,0.029835863002517726,0.00014812199515290558 +7140363787,365065389,0.16060936499707168,5289.464871890885,2827,5691,3,0.029732053997577168,0.0001641850030864589 +34053436,574510655,0.13449935099924915,12493.937351844768,2827,5691,3,0.03673829699982889,0.0001338760048383847 +4016874617,600866945,0.03444541599310469,336.22355324649334,2827,5691,3,0.025150192996079568,0.0001335359993390739 +2604893830,317840526,0.033937345004233066,309.94330930385564,2827,5691,3,0.030045136001717765,0.00017759900219971314 +358407314,408478842,0.05122477700206218,401.91530793157204,2827,5691,3,0.037094525003340095,0.00016986099944915622 +7031902220,7413975520,0.05967648500518408,564.4893406225968,2827,5691,3,0.03245272000640398,0.00014979099796619266 +7172883308,294919117,0.03263318400422577,170.233971842473,2827,5691,3,0.031021587004943285,0.00014976900274632499 +1253890916,563194893,0.0370539380091941,391.1747845270358,2827,5691,3,0.026461945002665743,0.0001331370003754273 +2598988057,1718397716,0.07217752800352173,546.5151867025655,2827,5691,3,0.03469335199770285,0.000258364001638256 +4033695046,3462099364,0.0765392429966596,407.49923848865484,2827,5691,3,0.05154037800093647,0.00022893399727763608 +7031881626,6417387130,0.031294264997995924,156.7057004635975,2827,5691,3,0.02944477099663345,0.00013357999705476686 +600858466,418009803,0.03277176600386156,338.1322944383446,2827,5691,3,0.024690256999747362,0.000133293004182633 +563191187,600866946,0.03260277200752171,296.72303474174004,2827,5691,3,0.025442889003898017,0.0001829210013966076 +549943303,110236457,0.19823851800174452,16061.351333843417,2827,5691,3,0.03400557600252796,0.00016302099538734183 +2360479288,574505822,0.06603433399141068,434.8168387633591,2827,5691,3,0.047148549994744826,0.0002223939955001697 +549931427,6448462029,0.04602842399617657,282.12944542993813,2827,5691,3,0.039396102001774125,0.00015461699513252825 +34053441,1505992703,0.02921961199172074,105.81963664036086,2827,5691,3,0.027504672994837165,0.0001335929991910234 +1656016522,268979982,0.03408875299646752,550.8666195183011,2827,5691,3,0.02586048300145194,0.00013299999409355223 +4955446065,5110912270,0.11530301200400572,None,2827,5691,3,0.028086596001230646,0.00025582600210327655 diff --git a/evaluation/run.py b/evaluation/run.py index 8684b4b..95733d8 100644 --- a/evaluation/run.py +++ b/evaluation/run.py @@ -1,6 +1,7 @@ import argparse import json import random +import pickle import logging from time import perf_counter from pathlib import Path @@ -11,22 +12,30 @@ from lib.T import * from lib.export import write_head, write_row from lib.queries import * +base = Path(__file__).parent + def query_benchmark(graphs, conf, result_dir): + # Charging Stations + cs_path = base.joinpath('static').joinpath(conf['charging_stations']) + with cs_path.open() as f: + charging_stations = json.load(f) + query_conf = [ - Query(query_function=gasstation_query, - filename='gasstation.csv', - row_dataclass=GasstationQueryRow), + # Query(query_function=gasstation_query, + # filename='gasstation.csv', + # row_dataclass=GasstationQueryRow), Query(charge_query, 'charge.csv', ChargeQueryRow), Query(classic_query, 'classic.csv', ClassicQueryRow), Query(astar_query, 'astar.csv', AStarQueryRow) ] for map_name, G in zip(conf['maps'], graphs): - nodes = random.choices(list(G.nodes), k=2 * conf['queries_per_setup']) + nodes = random.sample(list(G.nodes), k=2 * conf['queries_per_setup']) for setup in conf['setups']: start_nodes = nodes[:int(len(nodes) / 2)] target_nodes = nodes[int(len(nodes) / 2):] + insert_charging_stations(G, setup['charging_stations'], charging_stations) for func, filename, row_class in query_conf: logging.info('Running {} queries with {} on map {}'.format( @@ -40,26 +49,35 @@ def query_benchmark(graphs, conf, result_dir): write_row(f, func(G, setup, s, t)) -def get_map(osm_path: Path, cs_path: Path): +def insert_charging_stations(graph, number, charging_stations): start = perf_counter() - graph = read_osm(str(osm_path)) + graph.insert_charging_stations(charging_stations, number) runtime = perf_counter() - start - logging.info('Importing map {} took {:.2f} s'.format( - osm_path.name, + logging.info('Importing {} Charging Stations took {:.2f} s'.format( + len(graph.charging_stations), runtime )) - start = perf_counter() - with cs_path.open() as f: - cs = json.load(f) - graph.insert_charging_stations(cs) - runtime = perf_counter() - start - logging.info('Importing {} Charging Stations took {:.2f} s'.format( - len(cs), - runtime - )) +def get_map(osm_path: Path, backup_dir=None): + logging.info('Importing map {}'.format(osm_path.name)) + cache_path = backup_dir.joinpath(osm_path.with_suffix('.pck').name) + try: + with open(cache_path, 'rb') as f: + graph = pickle.load(f) + logging.info('Loaded map from cache {}'.format(cache_path)) + except FileNotFoundError: + start = perf_counter() + graph = read_osm(str(osm_path)) + runtime = perf_counter() - start + logging.info('Importing map took {:.2f} s'.format( + runtime + )) + with open(cache_path, 'wb') as f: + pickle.dump(graph, f) + else: + graph.rebuild_rtree() return graph @@ -78,14 +96,11 @@ if __name__ == '__main__': logging.basicConfig( format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', - level=logging.INFO) - base = Path(__file__).parent + level=logging.DEBUG) results_dir = base.joinpath('results') static_dir = base.joinpath('static') maps_dir = static_dir.joinpath('maps') - - # Charging Stations - cs_path = static_dir.joinpath('charging_stations.json') + maps_cache_dir = static_dir.joinpath('mapcache') parser = argparse.ArgumentParser(description='Run Benchmark Scripts.') parser.add_argument( @@ -106,7 +121,10 @@ if __name__ == '__main__': with base.joinpath('configs/', path).open() as f: conf = apply_conversions(yaml.load(f, Loader=yaml.Loader)) - graphs = [get_map(maps_dir.joinpath(m), cs_path) for m in conf['maps']] + graphs = [ + get_map(maps_dir.joinpath(m), maps_cache_dir) + for m in conf['maps'] + ] if conf['type'] == 'query': query_dir = benchmark_dir.joinpath('queries') diff --git a/evrouting/charge/routing.py b/evrouting/charge/routing.py index e87efa2..7575258 100644 --- a/evrouting/charge/routing.py +++ b/evrouting/charge/routing.py @@ -39,7 +39,7 @@ def shortest_path(G: nx.DiGraph, charging_stations: Set[Node], s: Node, t: Node, :return: """ - t, factories, queues = _setup( + t, dummy_cs, factories, queues = _setup( G=G, charging_stations=charging_stations, capacity=capacity, @@ -69,6 +69,8 @@ def shortest_path(G: nx.DiGraph, charging_stations: Set[Node], s: Node, t: Node, if node_min == t: G.remove_node(t) + charging_stations.remove(dummy_cs) + return _result( label_node_min, f_soc_factory(label_node_min).minimum ) @@ -137,13 +139,14 @@ def shortest_path(G: nx.DiGraph, charging_stations: Set[Node], s: Node, t: Node, prio_queue.insert(n, **keys(f_soc_factory(label_neighbour))) G.remove_node(t) + charging_stations.remove(dummy_cs) return EmptyResult() def _setup(G: nx.Graph, charging_stations: Set[Node], capacity: SoC, initial_soc: SoC, final_soc: SoC, s: Node, t: Node, c: ConsumptionFunction - ) -> Tuple[Node, Dict, Dict]: + ) -> Tuple[Node, Node, Dict, Dict]: """ Initialises the data structures and graph setup. @@ -203,6 +206,7 @@ def _setup(G: nx.Graph, charging_stations: Set[Node], capacity: SoC, prio_queue.insert(s, priority=0, count=0) return (t, # New final Node + dummy_node, { # factories 'f_soc': f_soc_factory, 'cf': cf_map, diff --git a/evrouting/gasstation/routing.py b/evrouting/gasstation/routing.py index b142a7d..ca26c2e 100644 --- a/evrouting/gasstation/routing.py +++ b/evrouting/gasstation/routing.py @@ -1,3 +1,4 @@ +import logging from typing import Set, List import networkx as nx @@ -9,6 +10,8 @@ from evrouting.graph_tools import ( AccessFunctions ) +logger = logging.getLogger(__name__) + def insert_start_node(s: Node, graph_core: nx.Graph, @@ -109,6 +112,9 @@ def contract_graph(G: nx.Graph, charging_stations: Set[Node], capacity: SoC, return H all_cs = list(charging_stations) + logger.debug(f'Contracting on {len(all_cs)} charging stations.') + done = 0 + total = len(all_cs) * (len(all_cs) - 1) / 2 for i in range(len(all_cs) - 1): cs = all_cs[i] H.add_node(cs, **G.nodes[cs]) @@ -127,6 +133,9 @@ def contract_graph(G: nx.Graph, charging_stations: Set[Node], capacity: SoC, DISTANCE_KEY: f.path_distance(G, path) } ) + done += len(all_cs) - i - 1 + logger.debug(f'{done}/{total} evaluated.') + H.add_node(all_cs[-1], **G.nodes[all_cs[-1]]) return H diff --git a/evrouting/graph_tools.py b/evrouting/graph_tools.py index 584129e..0807efe 100644 --- a/evrouting/graph_tools.py +++ b/evrouting/graph_tools.py @@ -119,18 +119,3 @@ class AccessFunctions: def shortest_path(self, G, u, v): return nx.algorithms.shortest_path(G, u, v, weight=DISTANCE_KEY) - - -class GasstationAccessFunctions(AccessFunctions): - def __init__(self, consumption_coefficient): - super().__init__() - self.c = consumption_coefficient - - def consumption(self, G, u, v): - return self.c * self._distance(G, u, v) - - def charging_coefficient(self, G, v): - return 1 / self._charging_coefficient(G, v) - - def path_consumption(self, G, path): - return self.c * self.path_distance(G, path) diff --git a/evrouting/osm/imports.py b/evrouting/osm/imports.py index a293532..07ebd2f 100644 --- a/evrouting/osm/imports.py +++ b/evrouting/osm/imports.py @@ -14,6 +14,7 @@ Added : import xml.sax import logging import itertools +import random from collections import namedtuple, defaultdict import networkx as nx @@ -62,16 +63,28 @@ class OSMGraph(nx.DiGraph): for n in self.nodes: self.insert_into_rtree(n) - def insert_charging_stations(self, charging_stations): + def insert_charging_stations(self, charging_stations, num=None): """Insert Charging Stations""" + # Clean data + for n in self.charging_stations: + del self.nodes[n][CHARGING_COEFFICIENT_KEY] + S = set() + candidates = [] for s in charging_stations: - lon = s['lon'] - lat = s['lat'] - n = self.find_nearest((lat, lon), distance_limit=500) + n = self.find_nearest((s['lat'], s['lon']), distance_limit=500) if n is not None: - self.nodes[n][CHARGING_COEFFICIENT_KEY] = s['power'] / 3.6 # in Wh/s - S.add(n) + candidates.append((n, s)) + + if num is not None: + try: + candidates = random.sample(candidates, num) + except ValueError: + pass + + for n, s in candidates: + self.nodes[n][CHARGING_COEFFICIENT_KEY] = s['power'] / 3.6 # in Wh/s + S.add(n) self.charging_stations = S @@ -107,7 +120,6 @@ def read_osm(osm_xml_data, profile=car) -> OSMGraph: Create Graph containing all highways as edges. """ - osm = OSM(osm_xml_data) G = OSMGraph() -- GitLab