Skip to content
Snippets Groups Projects
Commit ea0c8806 authored by markn92's avatar markn92
Browse files

notebook

parent a102dc5c
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,4 @@ __pycache__
build
dist
*.egg-info
.ipynb_checkpoints
......@@ -7,6 +7,7 @@ verify_ssl = true
pytest = "*"
pandas = "*"
pyyaml = "*"
jupyter = "*"
[packages]
networkx = "*"
......
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,7 @@ type: query
charging_stations: charging_stations.json
maps:
- map.osm
queries_per_setup: 10
queries_per_setup: 100
setups:
- mu_s: 300 # Start and Target Soc
mu_t: 0
......
import networkx as nx
from time import perf_counter
from evaluation.export import write_row
from evaluation.T import (
GasstationQueryRow,
ChargeQueryRow,
ClassicQueryRow,
AStarQueryRow
)
import networkx as nx
from evrouting.T import Result
from evrouting import gasstation, charge
......@@ -18,6 +11,13 @@ from evrouting.graph_tools import (
from evrouting.osm.profiles import car
from evrouting.osm.routing import GasstationAccessFunctions, a_start_heuristic
from evaluation.T import (
GasstationQueryRow,
ChargeQueryRow,
ClassicQueryRow,
AStarQueryRow
)
__all__ = ['gasstation_query', 'charge_query', 'classic_query', 'astar_query']
......@@ -81,7 +81,7 @@ def charge_query(graph, conf, s, t):
capacity=conf['capacity'],
c=consumption_function_distance_factory(conf['consumption']['consumption_coefficient'])
)
runtime = start - perf_counter()
runtime = perf_counter() - start
return ChargeQueryRow(
start_node=s,
......
start_node,target_node,query_time,trip_time,nodes,edges,charging_stations
1828418198,317431301,0.00014760599879082292,7.279169256464534,2827,5691,4
6908239938,7286181357,0.012720081002044026,394.5397247638705,2827,5691,4
7030626842,2598982037,0.01626204000058351,514.2422639697024,2827,5691,4
1672334378,7322098499,0.00022359000286087394,None,2827,5691,4
687135582,4955445788,0.02305627299938351,745.9999671853842,2827,5691,4
1672334393,6417387131,0.00017938599921762943,None,2827,5691,4
318650171,426930264,0.0020166660033282824,121.57850376415072,2827,5691,4
2604684732,2604992913,0.0052501579993986525,278.957847495384,2827,5691,4
318014996,4226442915,0.0031801030054339208,228.43086492206294,2827,5691,4
3211622700,321209222,0.009974717999284621,439.60835992391065,2827,5691,4
574449274,7286181351,0.007244530000207305,194.81357670348197,2827,5691,4
1830470692,7115183094,0.0037291449998519965,365.0701651885908,2827,5691,4
1672267516,7286240205,0.012852728000325442,365.4259696245748,2827,5691,4
2608429637,7030625396,0.0021279939992382424,145.49989157996416,2827,5691,4
646729136,2604683547,0.003801269999712531,329.1692377041301,2827,5691,4
1927634037,600861117,0.018113262000042596,653.3670069918289,2827,5691,4
6448459754,687139213,0.010015463999479834,265.6577928817744,2827,5691,4
2705157125,563191192,0.00017039100021065678,15.652806802931288,2827,5691,4
408478762,2608597178,0.008205775000533322,516.9025756105535,2827,5691,4
5023014975,2729891520,0.00047845500012044795,149.55867942655965,2827,5691,4
2626137213,2604992645,0.010996431999956258,454.90186553427174,2827,5691,4
418009805,360747463,0.025557266000760137,None,2827,5691,4
2618898510,1505052639,0.008816516000479169,286.84951460120965,2827,5691,4
7158827508,1929118281,0.00848113300071418,267.7730506000322,2827,5691,4
292485413,1867147172,0.015547871000308078,419.7016162432571,2827,5691,4
318015069,268979973,0.002222527999947488,127.73244229126664,2827,5691,4
7286181370,321209223,0.022261187999902177,584.0213980757591,2827,5691,4
2608597178,2705157127,0.016426825000053213,466.55867829322426,2827,5691,4
600862363,2608501198,0.02221701300004497,635.0716590812289,2827,5691,4
1934188821,1828400039,0.02428194000003714,835.4607506525304,2827,5691,4
2608500961,418009803,0.009991426999476971,337.53501271787036,2827,5691,4
360747471,360747407,0.026660657000320498,None,2827,5691,4
677438068,1929118233,0.01690855500055477,422.19689265053086,2827,5691,4
574588784,2600543671,0.0005301569999573985,35.201949823759065,2827,5691,4
4016873907,2623041433,0.013542663000407629,396.12785224778844,2827,5691,4
574505825,549944400,0.003812443000242638,199.78210090744187,2827,5691,4
2611370483,2608394368,0.007541227999354305,248.24857545894645,2827,5691,4
1830463045,687139215,0.0006671089995506918,204.23245870150174,2827,5691,4
4955446064,2598985164,0.01778615399962291,473.8463632950769,2827,5691,4
748845115,4955446060,0.009072364000530797,442.10631460582454,2827,5691,4
306636858,1828408218,0.0006649690003541764,81.14322936786671,2827,5691,4
360747732,4475752956,0.012014001999887114,873.304437475315,2827,5691,4
2639898823,333265684,0.0019479270004012506,152.6155058467752,2827,5691,4
1828269090,1934189386,0.0007329299996854388,None,2827,5691,4
4955446064,7158827520,0.018310268000277574,433.5161478960859,2827,5691,4
360747697,34053451,0.01929134000056365,1030.163943385966,2827,5691,4
1828418198,4016874590,0.00014748099965800066,8.310544046719077,2827,5691,4
1929118261,6943345432,0.0030741860000489396,226.68264809697095,2827,5691,4
288944218,4955446074,0.0007261010005095159,146.75851962977313,2827,5691,4
3191239426,360747489,0.0024116080003295792,120.20878164582994,2827,5691,4
7140339578,574466056,0.014558408999619132,536.310376605903,2827,5691,4
1672334342,1828269090,0.000303513999824645,None,2827,5691,4
3462099368,7030626843,0.0022534210002049804,323.20742666960535,2827,5691,4
563194902,4383156581,0.0014395460002560867,81.0656456093864,2827,5691,4
2614920419,317841014,0.007590508000248519,343.646988063927,2827,5691,4
5609333813,4016873925,0.0010476020006535691,137.0727625051702,2827,5691,4
360747548,4955446073,0.00046362400007637916,None,2827,5691,4
4016874619,7030602782,0.002930756000750989,121.68675544208482,2827,5691,4
4929232376,687139214,0.010118010000041977,328.2759130247716,2827,5691,4
563191181,317767227,0.00480101100038155,374.2933101732441,2827,5691,4
2614897350,2608429851,0.01212241100074607,380.2359540707999,2827,5691,4
1828400039,3307706662,0.023569981000036933,856.824142783833,2827,5691,4
600861113,3273201483,0.0025922129998434684,353.9040093658782,2827,5691,4
360747468,2709164479,0.006778728999961459,245.74095622933788,2827,5691,4
294919113,360747793,0.025041631999556557,None,2827,5691,4
2604949484,430534360,0.022151607000523654,531.444063767383,2827,5691,4
474997017,2598988012,0.003749925999727566,224.84622715583626,2827,5691,4
90713490,574727048,0.0002176550005970057,None,2827,5691,4
4955446060,317958831,0.0023372580008071964,253.1386779169229,2827,5691,4
1768859055,45217541,0.0022630379999100114,369.37797748545194,2827,5691,4
2604992659,6448462029,0.004515603000072588,330.9659384616292,2827,5691,4
2619060546,7140339572,0.018461535999449552,534.3572520800851,2827,5691,4
3668786925,2634485441,0.0017088060003516148,87.54956980452867,2827,5691,4
574475517,2973923285,0.018262130999573856,479.8360902158978,2827,5691,4
2598868374,665115011,0.012274554000214266,454.0896767954179,2827,5691,4
5113940072,2611370483,0.01438836600027571,506.69207730498493,2827,5691,4
1929118226,306636860,0.002952249999907508,481.1279796611201,2827,5691,4
426948333,4383156580,0.010366024999711954,632.4592732803192,2827,5691,4
7030617897,2634485459,0.002415456000562699,146.1957070244722,2827,5691,4
2729891690,7321902563,0.004666603000259784,373.0782873038615,2827,5691,4
418009801,5609333814,0.010439554999720713,384.5693052272371,2827,5691,4
45217462,7030602777,0.0037208510002528783,198.85245885438133,2827,5691,4
7322098548,90713487,0.0073054190006587305,240.92212818527582,2827,5691,4
1929118240,2617662105,0.0009911890001603751,347.67919068459423,2827,5691,4
1929118302,7030617896,0.007518567999795778,418.0060975157141,2827,5691,4
288943155,2705157131,0.0072621700001036515,423.6989363258847,2827,5691,4
6448462030,5113940036,0.023298070000237203,628.443821622615,2827,5691,4
6448459778,473666786,0.022917225000128383,552.761982386143,2827,5691,4
306636856,1199554350,0.001594234000549477,147.70987970142252,2827,5691,4
3376536295,4903549431,0.0029419940001389477,236.41437406265553,2827,5691,4
7140363810,7182110437,0.014094901000134996,506.6812140226577,2827,5691,4
430536880,1618977288,0.021858088000044518,702.3366532415276,2827,5691,4
2604684729,408478826,0.010610469999846828,387.9706827162471,2827,5691,4
1672267779,7042580417,0.00024617800045234617,None,2827,5691,4
7321902568,321209231,0.015578853999613784,463.1345950736491,2827,5691,4
7042580411,549947350,0.003623890000199026,595.6450427142878,2827,5691,4
2335713723,6389441585,0.0011841410005217767,97.70926013331479,2827,5691,4
7286135546,3273193623,0.0016340120000677416,90.18525327898215,2827,5691,4
469720334,2385218587,0.014769893000448064,710.5952929463489,2827,5691,4
2611494654,17689721,0.00808964800035028,292.34574833206705,2827,5691,4
3123285425,418009264,0.017382225999426737,413.37339509309425,2827,5691,4
17689726,1756155427,0.00010261700026603648,None,2827,5691,4
5095519272,7158827515,0.014702512999974715,425.50618767906104,2827,5691,4
7321902571,473666768,0.022622257999501016,597.809710233175,2827,5691,4
574465013,665115011,0.011290923999695224,364.7229266193342,2827,5691,4
317840789,288946075,0.010630052999658801,336.3806379659176,2827,5691,4
288944217,474997356,0.01630163200024981,574.6411234434853,2827,5691,4
45217522,34053439,0.004241646999616933,120.5084189052182,2827,5691,4
17689721,1937178491,0.0005835790007040487,None,2827,5691,4
1934201756,1927634129,0.010097956999743474,606.6502915340575,2827,5691,4
start_node,target_node,query_time,trip_time,nodes,edges,charging_stations
1828418198,317431301,-0.00541873700422002,7.279169256464534,2828,5691,4
6908239938,7286181357,-0.011799191997852176,None,2827,5691,4
7030626842,2598982037,-0.009080265001102816,None,2828,5691,4
1672334378,7322098499,-0.07304622400260996,None,2827,5691,4
687135582,4955445788,-0.008829377002257388,None,2828,5691,4
1672334393,6417387131,-0.004487725003855303,None,2827,5691,4
318650171,426930264,-0.011571786999411415,None,2828,5691,4
2604684732,2604992913,-0.01105132199882064,None,2827,5691,4
318014996,4226442915,-0.041451365999819245,None,2828,5691,4
3211622700,321209222,-0.010363692003011238,None,2827,5691,4
574449274,7286181351,0.08593619800012675,None,2828,5691,4
1830470692,7115183094,0.00765740899987577,None,2827,5691,4
1672267516,7286240205,0.0046115260001897695,None,2828,5691,4
2608429637,7030625396,0.013127250999787066,None,2827,5691,4
646729136,2604683547,0.00497466699926008,None,2828,5691,4
1927634037,600861117,0.033602525999413047,None,2827,5691,4
6448459754,687139213,0.05243231499935064,None,2828,5691,4
2705157125,563191192,0.0051163930002076086,15.652806802931288,2827,5691,4
408478762,2608597178,0.005640194999614323,None,2828,5691,4
5023014975,2729891520,0.005571219999183086,None,2827,5691,4
2626137213,2604992645,0.013914183000451885,None,2828,5691,4
418009805,360747463,0.032114452000314486,None,2827,5691,4
2618898510,1505052639,0.012225428000419925,None,2828,5691,4
7158827508,1929118281,0.025428179000300588,None,2827,5691,4
292485413,1867147172,0.010187334999500308,None,2828,5691,4
318015069,268979973,0.012232138000399573,None,2827,5691,4
7286181370,321209223,0.04919259400048759,None,2828,5691,4
2608597178,2705157127,0.011482728000373754,None,2827,5691,4
600862363,2608501198,0.004978752000170061,None,2828,5691,4
1934188821,1828400039,0.006894655999531096,None,2827,5691,4
2608500961,418009803,0.011830726999505714,None,2828,5691,4
360747471,360747407,0.013290030999996816,None,2827,5691,4
677438068,1929118233,0.030689236000398523,None,2828,5691,4
574588784,2600543671,0.008700227000190353,35.201949823759065,2827,5691,4
4016873907,2623041433,0.01361600299969723,None,2828,5691,4
574505825,549944400,0.014139515999886498,None,2827,5691,4
2611370483,2608394368,0.012290613000004669,None,2828,5691,4
1830463045,687139215,0.031173609999314067,None,2827,5691,4
4955446064,2598985164,0.010806756000420137,None,2828,5691,4
748845115,4955446060,0.0053240240004015504,None,2827,5691,4
306636858,1828408218,0.012851230999331165,None,2828,5691,4
360747732,4475752956,0.005567711999901803,None,2827,5691,4
2639898823,333265684,0.012068131999512843,None,2828,5691,4
1828269090,1934189386,0.03118294099931518,None,2827,5691,4
4955446064,7158827520,0.011034157999347372,None,2828,5691,4
360747697,34053451,0.00555283599987888,None,2827,5691,4
1828418198,4016874590,0.005437205999442085,8.310544046719077,2828,5691,4
1929118261,6943345432,0.0075050380000902805,None,2827,5691,4
288944218,4955446074,0.007186824000200431,None,2828,5691,4
3191239426,360747489,0.04765999000028387,None,2827,5691,4
7140339578,574466056,0.005421976999969047,None,2828,5691,4
1672334342,1828269090,0.004812822000531014,None,2827,5691,4
3462099368,7030626843,0.00686892599969724,None,2828,5691,4
563194902,4383156581,0.014890090999870154,None,2827,5691,4
2614920419,317841014,0.04798837100042874,None,2828,5691,4
5609333813,4016873925,0.014463810000052035,None,2827,5691,4
360747548,4955446073,0.005759970000326575,None,2828,5691,4
4016874619,7030602782,0.018400271000245993,121.68675544208482,2827,5691,4
4929232376,687139214,0.013457410999762942,None,2828,5691,4
563191181,317767227,0.03352561999963655,None,2827,5691,4
2614897350,2608429851,0.02435055200021452,None,2828,5691,4
1828400039,3307706662,0.00637481099965953,None,2827,5691,4
600861113,3273201483,0.006827528000030725,None,2828,5691,4
360747468,2709164479,0.013690073999896413,None,2827,5691,4
294919113,360747793,0.008435933000328077,None,2828,5691,4
2604949484,430534360,0.03727748800065456,None,2827,5691,4
474997017,2598988012,0.008490320999953838,None,2828,5691,4
90713490,574727048,0.004952035999849613,None,2827,5691,4
4955446060,317958831,0.006151688000500144,None,2828,5691,4
1768859055,45217541,0.007079666999743495,None,2827,5691,4
2604992659,6448462029,0.006963455999539292,None,2828,5691,4
2619060546,7140339572,0.036078169000575144,None,2827,5691,4
3668786925,2634485441,0.027613982000730175,100.05486514333441,2828,5691,4
574475517,2973923285,0.021921657999882882,None,2827,5691,4
2598868374,665115011,0.011879695000061474,None,2828,5691,4
5113940072,2611370483,0.008804813000097056,None,2827,5691,4
1929118226,306636860,0.03466573100013193,None,2828,5691,4
426948333,4383156580,0.004811731999325275,None,2827,5691,4
7030617897,2634485459,0.015809116000127688,None,2828,5691,4
2729891690,7321902563,0.006943249999494583,None,2827,5691,4
418009801,5609333814,0.00742467000054603,None,2828,5691,4
45217462,7030602777,0.014405375000023923,None,2827,5691,4
7322098548,90713487,0.04046376499991311,None,2828,5691,4
1929118240,2617662105,0.008858984000653436,None,2827,5691,4
1929118302,7030617896,0.007767093000438763,None,2828,5691,4
288943155,2705157131,0.007660367999960727,None,2827,5691,4
6448462030,5113940036,0.013072276999992027,None,2828,5691,4
6448459778,473666786,0.0865379650003888,None,2827,5691,4
306636856,1199554350,0.007357987000432331,None,2828,5691,4
3376536295,4903549431,0.014785829000175,None,2827,5691,4
7140363810,7182110437,0.006760963000488118,None,2828,5691,4
430536880,1618977288,0.006050967000192031,None,2827,5691,4
2604684729,408478826,0.036886166999465786,None,2828,5691,4
1672267779,7042580417,0.004902184000457055,None,2827,5691,4
7321902568,321209231,0.061450432000128785,None,2828,5691,4
7042580411,549947350,0.004822902999876533,None,2827,5691,4
2335713723,6389441585,0.006925313000465394,None,2828,5691,4
7286135546,3273193623,0.012095413999304583,None,2827,5691,4
469720334,2385218587,0.031542064999484865,None,2828,5691,4
2611494654,17689721,0.006321780000689614,None,2827,5691,4
3123285425,418009264,0.007023025999842503,None,2828,5691,4
17689726,1756155427,0.004588992000208236,None,2827,5691,4
5095519272,7158827515,0.007595263000439445,None,2828,5691,4
7321902571,473666768,0.08791076299985434,None,2827,5691,4
574465013,665115011,0.012744218999614532,None,2828,5691,4
317840789,288946075,0.05369692099975509,None,2827,5691,4
288944217,474997356,0.00786934299958375,None,2828,5691,4
45217522,34053439,0.06782727299923863,None,2827,5691,4
17689721,1937178491,0.004479252999772143,None,2828,5691,4
1934201756,1927634129,0.030007266999746207,None,2827,5691,4
start_node,target_node,query_time,trip_time,nodes,edges,charging_stations,dijkstra_rank
1828418198,317431301,4.956599877914414e-05,7.279169256464534,2827,5691,4,0
6908239938,7286181357,0.0048305089949280955,394.5397247638705,2827,5691,4,0
7030626842,2598982037,0.004805078999197576,514.2422639697024,2827,5691,4,0
1672334378,7322098499,6.071800453355536e-05,None,2827,5691,4,0
687135582,4955445788,0.005866410996532068,745.9999671853842,2827,5691,4,0
1672334393,6417387131,4.006700328318402e-05,None,2827,5691,4,0
318650171,426930264,0.0007606210056110285,121.57850376415072,2827,5691,4,0
2604684732,2604992913,0.002318312006536871,278.957847495384,2827,5691,4,0
318014996,4226442915,0.0009691689992905594,228.43086492206294,2827,5691,4,0
3211622700,321209222,0.004724771999462973,439.60835992391065,2827,5691,4,0
574449274,7286181351,0.002132000000528933,194.81357670348197,2827,5691,4,0
1830470692,7115183094,0.001059727999745519,365.0701651885908,2827,5691,4,0
1672267516,7286240205,0.004697794000094291,365.4259696245748,2827,5691,4,0
2608429637,7030625396,0.0013560240004153457,145.49989157996416,2827,5691,4,0
646729136,2604683547,0.0021940370006632293,329.1692377041301,2827,5691,4,0
1927634037,600861117,0.005441782000161766,653.3670069918289,2827,5691,4,0
6448459754,687139213,0.0030470339997918927,265.6577928817744,2827,5691,4,0
2705157125,563191192,3.177300004608696e-05,15.652806802931288,2827,5691,4,0
408478762,2608597178,0.003333872999974119,516.9025756105535,2827,5691,4,0
5023014975,2729891520,0.00011267999980191234,149.55867942655965,2827,5691,4,0
2626137213,2604992645,0.002932804999545624,454.90186553427174,2827,5691,4,0
418009805,360747463,0.005694706000213046,None,2827,5691,4,0
2618898510,1505052639,0.0034874020002462203,286.84951460120965,2827,5691,4,0
7158827508,1929118281,0.0024861950005288236,267.7730506000322,2827,5691,4,0
292485413,1867147172,0.004668266999942716,419.7016162432571,2827,5691,4,0
318015069,268979973,0.0007367820007857517,127.73244229126664,2827,5691,4,0
7286181370,321209223,0.005551819999709551,584.0213980757591,2827,5691,4,0
2608597178,2705157127,0.0044703909998133895,466.55867829322426,2827,5691,4,0
600862363,2608501198,0.004721174000223982,635.0716590812289,2827,5691,4,0
1934188821,1828400039,0.005495439999322116,835.4607506525304,2827,5691,4,0
2608500961,418009803,0.0026901510000243434,337.53501271787036,2827,5691,4,0
360747471,360747407,0.005887925999559229,None,2827,5691,4,0
677438068,1929118233,0.005440525999802048,422.19689265053086,2827,5691,4,0
574588784,2600543671,0.0001726849995975499,35.201949823759065,2827,5691,4,0
4016873907,2623041433,0.00437952900028904,396.12785224778844,2827,5691,4,0
574505825,549944400,0.000982375000603497,199.78210090744187,2827,5691,4,0
2611370483,2608394368,0.002090531999783707,248.24857545894645,2827,5691,4,0
1830463045,687139215,0.0001545430004625814,204.23245870150174,2827,5691,4,0
4955446064,2598985164,0.005155176000698702,473.8463632950769,2827,5691,4,0
748845115,4955446060,0.002635769999869808,442.10631460582454,2827,5691,4,0
306636858,1828408218,0.00023694399988016812,81.14322936786671,2827,5691,4,0
360747732,4475752956,0.004541976000837167,873.304437475315,2827,5691,4,0
2639898823,333265684,0.0006542840001202421,152.6155058467752,2827,5691,4,0
1828269090,1934189386,0.0001281889999518171,None,2827,5691,4,0
4955446064,7158827520,0.004658738999751222,433.5161478960859,2827,5691,4,0
360747697,34053451,0.005695388999811257,1030.163943385966,2827,5691,4,0
1828418198,4016874590,4.4644000809057616e-05,8.310544046719077,2827,5691,4,0
1929118261,6943345432,0.0016043639998315484,226.68264809697095,2827,5691,4,0
288944218,4955446074,0.00023508399954152992,146.75851962977313,2827,5691,4,0
3191239426,360747489,0.0010205219996350934,120.20878164582994,2827,5691,4,0
7140339578,574466056,0.0041382330000487855,536.310376605903,2827,5691,4,0
1672334342,1828269090,6.561999998666579e-05,None,2827,5691,4,0
3462099368,7030626843,0.0009524540000711568,323.20742666960535,2827,5691,4,0
563194902,4383156581,0.0006674899996141903,81.0656456093864,2827,5691,4,0
2614920419,317841014,0.002951030000076571,343.646988063927,2827,5691,4,0
5609333813,4016873925,0.0003030119996765279,137.0727625051702,2827,5691,4,0
360747548,4955446073,8.350400003109826e-05,None,2827,5691,4,0
4016874619,7030602782,0.0008770009999352624,121.68675544208482,2827,5691,4,0
4929232376,687139214,0.002810863999911817,328.2759130247716,2827,5691,4,0
563191181,317767227,0.002074660000289441,374.2933101732441,2827,5691,4,0
2614897350,2608429851,0.0036189310003464925,380.2359540707999,2827,5691,4,0
1828400039,3307706662,0.0060952080002607545,856.824142783833,2827,5691,4,0
600861113,3273201483,0.0009470679997320985,353.9040093658782,2827,5691,4,0
360747468,2709164479,0.0030611800002589007,245.74095622933788,2827,5691,4,0
294919113,360747793,0.005909673999667575,None,2827,5691,4,0
2604949484,430534360,0.005629332000353315,531.444063767383,2827,5691,4,0
474997017,2598988012,0.0013550579997172463,224.84622715583626,2827,5691,4,0
90713490,574727048,5.091399998491397e-05,None,2827,5691,4,0
4955446060,317958831,0.0008191729993995978,253.1386779169229,2827,5691,4,0
1768859055,45217541,0.000595557000451663,369.37797748545194,2827,5691,4,0
2604992659,6448462029,0.002697282000553969,330.9659384616292,2827,5691,4,0
2619060546,7140339572,0.005117643000630778,534.3572520800851,2827,5691,4,0
3668786925,2634485441,0.0005062899999757065,87.54956980452867,2827,5691,4,0
574475517,2973923285,0.004969312999492104,479.8360902158978,2827,5691,4,0
2598868374,665115011,0.003255554999668675,454.0896767954179,2827,5691,4,0
5113940072,2611370483,0.004374828999971214,506.69207730498493,2827,5691,4,0
1929118226,306636860,0.001400148999891826,481.1279796611201,2827,5691,4,0
426948333,4383156580,0.005427146999863908,632.4592732803192,2827,5691,4,0
7030617897,2634485459,0.001061169999957201,146.1957070244722,2827,5691,4,0
2729891690,7321902563,0.0016252369996436755,373.0782873038615,2827,5691,4,0
418009801,5609333814,0.004048009000143793,384.5693052272371,2827,5691,4,0
45217462,7030602777,0.0022971919997871737,198.85245885438133,2827,5691,4,0
7322098548,90713487,0.0024017229998207767,240.92212818527582,2827,5691,4,0
1929118240,2617662105,0.0003293630006737658,347.67919068459423,2827,5691,4,0
1929118302,7030617896,0.003332670999952825,418.0060975157141,2827,5691,4,0
288943155,2705157131,0.0028380519997881493,423.6989363258847,2827,5691,4,0
6448462030,5113940036,0.006904796000526403,628.443821622615,2827,5691,4,0
6448459778,473666786,0.0060929020000912715,552.761982386143,2827,5691,4,0
306636856,1199554350,0.0005567349999182625,147.70987970142252,2827,5691,4,0
3376536295,4903549431,0.0009456130001126439,236.41437406265553,2827,5691,4,0
7140363810,7182110437,0.005062401000031969,506.6812140226577,2827,5691,4,0
430536880,1618977288,0.0055735649993948755,702.3366532415276,2827,5691,4,0
2604684729,408478826,0.004554826999992656,387.9706827162471,2827,5691,4,0
1672267779,7042580417,5.5530000281578396e-05,None,2827,5691,4,0
7321902568,321209231,0.004548589000478387,463.1345950736491,2827,5691,4,0
7042580411,549947350,0.001493896000283712,595.6450427142878,2827,5691,4,0
2335713723,6389441585,0.00035079100052826107,97.70926013331479,2827,5691,4,0
7286135546,3273193623,0.00039949099937075516,90.18525327898215,2827,5691,4,0
469720334,2385218587,0.003727649000211386,710.5952929463489,2827,5691,4,0
2611494654,17689721,0.0026275109994458035,292.34574833206705,2827,5691,4,0
3123285425,418009264,0.0053733619997728965,413.37339509309425,2827,5691,4,0
17689726,1756155427,3.124000068055466e-05,None,2827,5691,4,0
5095519272,7158827515,0.003978052999627835,425.50618767906104,2827,5691,4,0
7321902571,473666768,0.005549919999793929,597.809710233175,2827,5691,4,0
574465013,665115011,0.003740268000001379,364.7229266193342,2827,5691,4,0
317840789,288946075,0.003132486999675166,336.3806379659176,2827,5691,4,0
288944217,474997356,0.004560741000204871,574.6411234434853,2827,5691,4,0
45217522,34053439,0.0015629919998900732,120.5084189052182,2827,5691,4,0
17689721,1937178491,0.00010327900054107886,None,2827,5691,4,0
1934201756,1927634129,0.002730947000600281,606.6502915340575,2827,5691,4,0
start_node,target_node,query_time,trip_time,nodes,edges,charging_stations,time_contracted_graph,time_state_graph
1828418198,317431301,0.013457719011057634,7.279169256464534,2827,5691,3,0.013232094002887607,0.00015533400437561795
6908239938,7286181357,0.01858366200031014,394.5397247638705,2827,5691,3,0.011774632999731693,0.0001285780017497018
7030626842,2598982037,0.019493229003273882,514.2422639697024,2827,5691,3,0.012273380998522043,0.0001298909992328845
1672334378,7322098499,0.011932426001294516,None,2827,5691,3,0.011734421001165174,0.00012836899986723438
687135582,4955445788,0.06945202999486355,15920.213155107229,2827,5691,3,0.011887456996191759,0.0001311939995503053
1672334393,6417387131,0.011970645995461382,None,2827,5691,3,0.011739390000002459,0.0001719049978419207
318650171,426930264,0.012910725999972783,121.57850376415072,2827,5691,3,0.011731954000424594,0.00015385100414277986
2604684732,2604992913,0.015297935999114998,278.957847495384,2827,5691,3,0.011814755998784676,0.00013210000179242343
318014996,4226442915,0.01378022700373549,228.43086492206294,2827,5691,3,0.012272058003873099,0.00013237199891591445
3211622700,321209222,0.0201044030036428,439.60835992391065,2827,5691,3,0.012434723998012487,0.0001317000060225837
574449274,7286181351,0.015018925999356725,194.81357670348197,2827,5691,3,0.01209944899983384,0.00015030699978524353
1830470692,7115183094,0.013063663000139059,365.0701651885908,2827,5691,3,0.011355438000464346,0.00013336699976207456
1672267516,7286240205,0.01965242699952796,365.4259696245748,2827,5691,3,0.011933394999687152,0.00014723399999638787
2608429637,7030625396,0.013394438999966951,145.49989157996416,2827,5691,3,0.011491406000459392,0.00013302199931786163
646729136,2604683547,0.014605790999667079,329.1692377041301,2827,5691,3,0.011617147999459121,0.0001327760001004208
1927634037,600861117,0.054630894000183616,12183.340698138662,2827,5691,3,0.01177944800019759,0.00013192999995226273
6448459754,687139213,0.01576280199969915,265.6577928817744,2827,5691,3,0.01159239900061948,0.00013257399950816762
2705157125,563191192,0.01166417099921091,15.652806802931288,2827,5691,3,0.011384700999769848,0.00020409299941093195
408478762,2608597178,0.01878609100003814,516.9025756105535,2827,5691,3,0.012922717000037665,0.00014733900025021285
5023014975,2729891520,0.011952783000197087,149.55867942655965,2827,5691,3,0.011576683000384946,0.00014372300029208418
2626137213,2604992645,0.01958304199979466,454.90186553427174,2827,5691,3,0.014248741999836056,0.0001479580005252501
418009805,360747463,0.022044628999537963,None,2827,5691,3,0.01230095099981554,0.00013680099982593674
2618898510,1505052639,0.018034554001133074,286.84951460120965,2827,5691,3,0.012579205000292859,0.00013387800026976038
7158827508,1929118281,0.015208945999802381,267.7730506000322,2827,5691,3,0.011641946999588981,0.00013185199986764928
292485413,1867147172,0.019499177999932726,419.7016162432571,2827,5691,3,0.011811246999968716,0.00014724799984833226
318015069,268979973,0.01278751499921782,127.73244229126664,2827,5691,3,0.01174241599983361,0.00013392999971983954
7286181370,321209223,0.021670625998922333,584.0213980757591,2827,5691,3,0.01232922300005157,0.00013350999961403431
2608597178,2705157127,0.019550712999262032,466.55867829322426,2827,5691,3,0.01200022800003353,0.00013266599944472546
600862363,2608501198,0.054031454001233215,11984.313626612588,2827,5691,3,0.011827582000478287,0.0001346380004179082
1934188821,1828400039,0.05727468700024474,24347.28448705321,2827,5691,3,0.011709579000125814,0.00013376800052355975
2608500961,418009803,0.015973399999893445,337.53501271787036,2827,5691,3,0.011786766999648535,0.0001339939999525086
360747471,360747407,0.020735572000376123,None,2827,5691,3,0.011788970000452537,0.00013473899980454007
677438068,1929118233,0.019666210000650608,422.19689265053086,2827,5691,3,0.011672347000057925,0.0001447180002287496
574588784,2600543671,0.012342144001195265,35.201949823759065,2827,5691,3,0.011996940000244649,0.00013510300050256774
4016873907,2623041433,0.017797880999751214,396.12785224778844,2827,5691,3,0.011562951000087196,0.00013397399925452191
574505825,549944400,0.012854313999923761,199.78210090744187,2827,5691,3,0.01140368500000477,0.00013146099990990479
2611370483,2608394368,0.015042540000649751,248.24857545894645,2827,5691,3,0.011913700999684806,0.0001535520004836144
1830463045,687139215,0.012107460999686737,204.23245870150174,2827,5691,3,0.011665738000374404,0.00014054399980523158
4955446064,2598985164,0.02055163699969853,473.8463632950769,2827,5691,3,0.011883760999808146,0.000134007999804453
748845115,4955446060,0.015979974999027036,442.10631460582454,2827,5691,3,0.011759297000025981,0.0001416159993823385
306636858,1828408218,0.011676494000312232,81.14322936786671,2827,5691,3,0.011212391999833926,0.0001344780002909829
360747732,4475752956,0.044248160998904496,None,2827,5691,3,0.011578495999856386,0.0001354529995296616
2639898823,333265684,0.013066581999737537,152.6155058467752,2827,5691,3,0.012058493000040471,0.00015590899965900462
1828269090,1934189386,0.011976109999523032,None,2827,5691,3,0.011654058999738481,0.00013586499972007005
4955446064,7158827520,0.01932779699927778,433.5161478960859,2827,5691,3,0.011668669999380654,0.0001450730005672085
360747697,34053451,0.047545055000227876,None,2827,5691,3,0.011989263000032224,0.00014054900020710193
1828418198,4016874590,0.012145542000325804,8.310544046719077,2827,5691,3,0.011931345999983023,0.00013828000010107644
1929118261,6943345432,0.013831805000336317,226.68264809697095,2827,5691,3,0.011486258000331873,0.00013466699965647422
288944218,4955446074,0.012797487999705481,146.75851962977313,2827,5691,3,0.012289352999687253,0.00014908899993315572
3191239426,360747489,0.013128102000337094,120.20878164582994,2827,5691,3,0.011605712000346102,0.00015101499957381748
7140339578,574466056,0.018418351000036637,536.310376605903,2827,5691,3,0.011457124999651569,0.00013295799999468727
1672334342,1828269090,0.01177331899998535,None,2827,5691,3,0.011556862000361434,0.00013753699931839947
3462099368,7030626843,0.013842734000718337,323.20742666960535,2827,5691,3,0.012424718999682227,0.00013912900067225564
563194902,4383156581,0.012654706001740124,81.0656456093864,2827,5691,3,0.011890292000316549,0.0001382630007356056
2614920419,317841014,0.01737158600008115,343.646988063927,2827,5691,3,0.012107259000003978,0.00014161099988996284
5609333813,4016873925,0.013318471999809844,137.0727625051702,2827,5691,3,0.012697295999714697,0.0001429330004611984
360747548,4955446073,0.012103218999072851,None,2827,5691,3,0.011838233999696968,0.0001426779999746941
4016874619,7030602782,0.013167287000214856,121.68675544208482,2827,5691,3,0.011847499999930733,0.00017007200040097814
4929232376,687139214,0.015711972999270074,328.2759130247716,2827,5691,3,0.01146052999956737,0.0001338989995929296
563191181,317767227,0.015062797000609862,374.2933101732441,2827,5691,3,0.01169167500029289,0.0001368080002066563
2614897350,2608429851,0.017553908999616397,380.2359540707999,2827,5691,3,0.011829070999738178,0.00014087199997447897
1828400039,3307706662,0.06068579699967813,37367.92191261726,2827,5691,3,0.012305381999794918,0.0001450929994462058
600861113,3273201483,0.013261052000416385,353.9040093658782,2827,5691,3,0.011826281999674393,0.00013996200050314656
360747468,2709164479,0.017399234000549768,245.74095622933788,2827,5691,3,0.012502657999903022,0.0001398270005665836
294919113,360747793,0.020799636999981885,None,2827,5691,3,0.01149400499980402,0.0001398009999320493
2604949484,430534360,0.020591855000020587,531.444063767383,2827,5691,3,0.01192563600034191,0.00013852800020686118
474997017,2598988012,0.013450028000988823,224.84622715583626,2827,5691,3,0.011536746999809111,0.00013996800043969415
90713490,574727048,0.012300025000513415,None,2827,5691,3,0.012088536000192107,0.00014108600043982733
4955446060,317958831,0.013021018000472395,253.1386779169229,2827,5691,3,0.01163436500064563,0.00017535999995743623
1768859055,45217541,0.012589740000294114,369.37797748545194,2827,5691,3,0.011512703000335023,0.00013626999952975893
2604992659,6448462029,0.015704702000221005,330.9659384616292,2827,5691,3,0.011701393000294047,0.0001405019993399037
2619060546,7140339572,0.020564095000736415,534.3572520800851,2827,5691,3,0.011498877999656543,0.000260530000559811
3668786925,2634485441,0.012577534999763884,87.54956980452867,2827,5691,3,0.011673900999994657,0.00013813700024911668
574475517,2973923285,0.019423581999944872,479.8360902158978,2827,5691,3,0.01137950100019225,0.0001590609999766457
2598868374,665115011,0.01748340999984066,454.0896767954179,2827,5691,3,0.011772404999646824,0.0001395919998685713
5113940072,2611370483,0.01968589499938389,506.69207730498493,2827,5691,3,0.011650995999843872,0.00013981600022816565
1929118226,306636860,0.013906837998547417,481.1279796611201,2827,5691,3,0.011932200999581255,0.00013702399974135915
426948333,4383156580,0.06280240799969761,29426.11244954581,2827,5691,3,0.011752409000109765,0.00013736199980485253
7030617897,2634485459,0.012872112000877678,146.1957070244722,2827,5691,3,0.011659931000394863,0.0001313680004386697
2729891690,7321902563,0.013829377000547538,373.0782873038615,2827,5691,3,0.011507036000693915,0.0001431459995728801
418009801,5609333814,0.0176972030003526,384.5693052272371,2827,5691,3,0.012787892000233114,0.0001344760003121337
45217462,7030602777,0.014939913001398963,198.85245885438133,2827,5691,3,0.012099903000489576,0.00013436400058708386
7322098548,90713487,0.014599467999687477,240.92212818527582,2827,5691,3,0.011295960000097693,0.00013149299957149196
1929118240,2617662105,0.01204746100029297,347.67919068459423,2827,5691,3,0.011417407999942952,0.00016900500031624688
1929118302,7030617896,0.016128723000292666,418.0060975157141,2827,5691,3,0.011558555000192428,0.0001426680000804481
288943155,2705157131,0.015667831000428123,423.6989363258847,2827,5691,3,0.01178254200021911,0.00014033400020707631
6448462030,5113940036,0.05754554100076348,7202.518819212052,2827,5691,3,0.011936375000004773,0.0001444469999114517
6448459778,473666786,0.08914263899987418,552.761982386143,2827,5691,3,0.0800569290004205,0.00013604400010081008
306636856,1199554350,0.012293567999222432,147.70987970142252,2827,5691,3,0.01149414599967713,0.00013973499972053105
3376536295,4903549431,0.01264663600068161,236.41437406265553,2827,5691,3,0.011278377000053297,0.00013450800088321557
7140363810,7182110437,0.020272478999686427,506.6812140226577,2827,5691,3,0.011974701999861281,0.0001488679999965825
430536880,1618977288,0.06175760199857905,13995.217609377522,2827,5691,3,0.011928469999475055,0.0001359549996777787
2604684729,408478826,0.018585697999697004,387.9706827162471,2827,5691,3,0.01172695199966256,0.00014131799980532378
1672267779,7042580417,0.012743102999593248,None,2827,5691,3,0.012518847000137612,0.00014342499980557477
7321902568,321209231,0.01946347800003423,463.1345950736491,2827,5691,3,0.011920476999875973,0.0001360810001642676
7042580411,549947350,0.013801319000776857,595.6450427142878,2827,5691,3,0.011524159000146028,0.00013720100014324998
2335713723,6389441585,0.012861416998930508,97.70926013331479,2827,5691,3,0.012198081999486021,0.00014589599959435873
7286135546,3273193623,0.012108061000617454,90.18525327898215,2827,5691,3,0.011402422999708506,0.00013520100037567317
469720334,2385218587,0.053339213000981545,14300.787278455899,2827,5691,3,0.012162844000158657,0.00013995800054544816
2611494654,17689721,0.017071375000341504,292.34574833206705,2827,5691,3,0.012691732000348566,0.00015612199968018103
3123285425,418009264,0.020605624000381795,413.37339509309425,2827,5691,3,0.012426183000570745,0.0001423559997419943
17689726,1756155427,0.011878596999849833,None,2827,5691,3,0.011697631000060937,0.0001359309999315883
5095519272,7158827515,0.017856057999779296,425.50618767906104,2827,5691,3,0.011642557000413944,0.00013655400016432395
7321902571,473666768,0.020817354999962845,597.809710233175,2827,5691,3,0.011727275000339432,0.00014099999953032238
574465013,665115011,0.019758383000407775,364.7229266193342,2827,5691,3,0.014047600999219867,0.00016872100059117656
317840789,288946075,0.016765909000241663,336.3806379659176,2827,5691,3,0.012114144000406668,0.0001369559995509917
288944217,474997356,0.020753676999447634,574.6411234434853,2827,5691,3,0.013019476000408758,0.00014130899944575503
45217522,34053439,0.014788786999815784,120.5084189052182,2827,5691,3,0.01188141100010398,0.000141453999276564
17689721,1937178491,0.01199420400098461,None,2827,5691,3,0.011671221000142395,0.00016485100059071556
1934201756,1927634129,0.05159768700013956,10071.104160109138,2827,5691,3,0.012008661999971082,0.0001401170002282015
import argparse
import json
import random
import logging
from time import perf_counter
from pathlib import Path
import yaml
......@@ -20,13 +22,18 @@ def query_benchmark(graphs, conf, result_dir):
Query(astar_query, 'astar.csv', AStarQueryRow)
]
for G in graphs:
for map_name, G in zip(conf['maps'], graphs):
nodes = random.choices(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):]
for func, filename, row_class in query_conf:
logging.info('Running {} queries with {} on map {}'.format(
len(start_nodes),
func.__name__,
map_name
))
with result_dir.joinpath(filename).open('w') as f:
write_head(f, row_class)
for s, t in zip(start_nodes, target_nodes):
......@@ -34,11 +41,25 @@ def query_benchmark(graphs, conf, result_dir):
def get_map(osm_path: Path, cs_path: Path):
start = perf_counter()
graph = read_osm(str(osm_path))
runtime = perf_counter() - start
logging.info('Importing map {} took {:.2f} s'.format(
osm_path.name,
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
))
return graph
......@@ -54,6 +75,10 @@ def apply_conversions(conf):
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
results_dir = base.joinpath('results')
static_dir = base.joinpath('static')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment