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

make dir for every run

parent 5810b574
Branches
No related tags found
No related merge requests found
......@@ -5,8 +5,8 @@ type: rank
charging_stations: charging_stations.json
maps:
- medium_nurnberg.osm
queries_per_rank: 10
ranks: [2, 4, 6, 8]
queries_per_rank: 20
ranks: [2, 4, 6, 8, 10, 12, 14]
setups:
- mu_s: 40 # Start and Target Soc
mu_t: 0
......
......@@ -81,9 +81,8 @@ def _get_target_with_rank(graph, start_node, rank):
def query(graphs, charging_stations, conf, result_dir):
_init_result_files(result_dir)
for map_name, G in zip(conf['maps'], graphs):
nodes = random.sample(list(G.nodes), k=2 * conf['queries_per_setup'])
for setup in conf['setups']:
nodes = random.sample(list(G.nodes), k=2 * conf['queries_per_setup'])
# Random start and target nodes
start_nodes = nodes[:int(len(nodes) / 2)]
target_nodes = nodes[int(len(nodes) / 2):]
......
import argparse
import pickle
import datetime
import json
import logging
from time import perf_counter
......@@ -66,6 +67,8 @@ if __name__ == '__main__':
r = base.joinpath('results')
r.mkdir(exist_ok=True)
r = r.joinpath(datetime.datetime.now().isoformat())
r.mkdir()
args = parser.parse_args()
path: Path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment