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

added conversion

parent 7aa3f058
No related branches found
No related tags found
No related merge requests found
...@@ -7,10 +7,10 @@ maps: ...@@ -7,10 +7,10 @@ maps:
- map.osm - map.osm
queries_per_setup: 10 queries_per_setup: 10
setups: setups:
- mu_s: 85 # Start and Target Soc - mu_s: 300 # Start and Target Soc
mu_t: 0 mu_t: 0
charging_stations: 10 # Max Number of charging Stations to be inserted. charging_stations: 10 # Max Number of charging Stations to be inserted.
capacity: 85 # kWh capacity: 300 # kWh
consumption: consumption:
type: gasstation type: gasstation
consumption_coefficient: 100 # kWh/s consumption_coefficient: 0.5 # kWh/s
start_node,target_node,query_time,trip_time,nodes,edges,charging_stations,time_contracted_graph,time_state_graph start_node,target_node,query_time,trip_time,nodes,edges,charging_stations,time_contracted_graph,time_state_graph
549931430,3273201464,0.02408712999749696,None,2827,5691,3,0.014958268002374098,3.0371003958862275e-05 2612700813,2632841214,0.005009925000194926,383.4794987778951,2827,5691,3,0.016830534004839137,0.00015566699585178867
2729891690,6603016874,0.02328153499547625,None,2827,5691,3,0.01450053900043713,3.0627001251559705e-05 563191193,317944965,0.007466991002729628,446.99022181478455,2827,5691,3,0.017327437999483664,0.00013550499716075137
34053773,408478843,0.03271863699774258,None,2827,5691,3,0.014691472999402322,1.9122999219689518e-05 7286240208,2604687836,0.00499775999924168,406.2307557413689,2827,5691,3,0.015518132997385692,0.0002068149988190271
292981057,4955446070,0.029121861000021454,None,2827,5691,3,0.01552509299654048,2.008400042541325e-05 2639898855,574457829,0.0028420240050763823,339.7265922483922,2827,5691,3,0.015539429994532838,0.00013767200289294124
1254599554,360747579,0.017258337000384927,None,2827,5691,3,0.014459179998084437,1.8801998521666974e-05 2612700817,7286181375,0.005542577993765008,372.43394892215343,2827,5691,3,0.015766301003168337,0.00013465899974107742
6389441586,508824243,0.016824515005282592,None,2827,5691,3,0.015478776003874373,1.987600262509659e-05 2616462194,4955446076,0.006115891002991702,374.0087002891246,2827,5691,3,0.015495608000492211,0.00015103199984878302
7042580410,1929118248,0.04107918299996527,None,2827,5691,3,0.01451436200295575,1.9384002371225506e-05 4955446025,1505052669,0.009748128002684098,535.7659858061888,2827,5691,3,0.01556892799999332,0.0001692669975454919
7074500856,7140363786,0.03340997399936896,None,2827,5691,3,0.014721665997058153,1.9647995941340923e-05 2700412801,563194900,0.0009064859987120144,161.78412446050507,2827,5691,3,0.015535534999798983,0.00013569000293500721
360747732,4955446065,0.026879377001023386,None,2827,5691,3,0.016268585000943858,1.9888000679202378e-05 5113940072,1768859059,0.05034502399939811,22741.474067970452,2827,5691,3,0.015074203001859132,0.00013480500638252124
600866946,4016874580,0.02424645799328573,None,2827,5691,3,0.0144769019971136,2.0027000573463738e-05 1929118150,687139215,0.041247827000916004,16827.8805214423,2827,5691,3,0.014938869993784465,0.0001336659988737665
...@@ -47,6 +47,16 @@ def get_map(osm_path: Path, cs_path: Path): ...@@ -47,6 +47,16 @@ def get_map(osm_path: Path, cs_path: Path):
return graph return graph
def apply_conversions(conf):
"""kWh to Wh"""
for setup in conf['setups']:
setup['capacity'] = 1000 * setup['capacity']
setup['consumption']['consumption_coefficient'] = 1000 * setup['consumption']['consumption_coefficient']
setup['mu_s'] = 1000 * setup['mu_s']
setup['mu_t'] = 1000 * setup['mu_t']
return conf
if __name__ == '__main__': if __name__ == '__main__':
base = Path(__file__).parent base = Path(__file__).parent
results_dir = base.joinpath('results') results_dir = base.joinpath('results')
...@@ -73,7 +83,7 @@ if __name__ == '__main__': ...@@ -73,7 +83,7 @@ if __name__ == '__main__':
path = path.with_suffix('.yaml') path = path.with_suffix('.yaml')
with base.joinpath('configs/', path).open() as f: with base.joinpath('configs/', path).open() as f:
conf = yaml.load(f, Loader=yaml.Loader) 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), cs_path) for m in conf['maps']]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment