Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ba
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
markn92
ba
Commits
057cfd43
Commit
057cfd43
authored
4 years ago
by
markn92
Browse files
Options
Downloads
Patches
Plain Diff
make dir for every run
parent
5810b574
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
evaluation/configs/example_rank.yaml
+2
-2
2 additions, 2 deletions
evaluation/configs/example_rank.yaml
evaluation/lib/benchmarks.py
+1
-2
1 addition, 2 deletions
evaluation/lib/benchmarks.py
evaluation/run.py
+3
-0
3 additions, 0 deletions
evaluation/run.py
with
6 additions
and
4 deletions
evaluation/configs/example_rank.yaml
+
2
−
2
View file @
057cfd43
...
@@ -5,8 +5,8 @@ type: rank
...
@@ -5,8 +5,8 @@ type: rank
charging_stations
:
charging_stations.json
charging_stations
:
charging_stations.json
maps
:
maps
:
-
medium_nurnberg.osm
-
medium_nurnberg.osm
queries_per_rank
:
1
0
queries_per_rank
:
2
0
ranks
:
[
2
,
4
,
6
,
8
]
ranks
:
[
2
,
4
,
6
,
8
,
10
,
12
,
14
]
setups
:
setups
:
-
mu_s
:
40
# Start and Target Soc
-
mu_s
:
40
# Start and Target Soc
mu_t
:
0
mu_t
:
0
...
...
This diff is collapsed.
Click to expand it.
evaluation/lib/benchmarks.py
+
1
−
2
View file @
057cfd43
...
@@ -81,9 +81,8 @@ def _get_target_with_rank(graph, start_node, rank):
...
@@ -81,9 +81,8 @@ def _get_target_with_rank(graph, start_node, rank):
def
query
(
graphs
,
charging_stations
,
conf
,
result_dir
):
def
query
(
graphs
,
charging_stations
,
conf
,
result_dir
):
_init_result_files
(
result_dir
)
_init_result_files
(
result_dir
)
for
map_name
,
G
in
zip
(
conf
[
'
maps
'
],
graphs
):
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
'
]:
for
setup
in
conf
[
'
setups
'
]:
nodes
=
random
.
sample
(
list
(
G
.
nodes
),
k
=
2
*
conf
[
'
queries_per_setup
'
])
# Random start and target nodes
# Random start and target nodes
start_nodes
=
nodes
[:
int
(
len
(
nodes
)
/
2
)]
start_nodes
=
nodes
[:
int
(
len
(
nodes
)
/
2
)]
target_nodes
=
nodes
[
int
(
len
(
nodes
)
/
2
):]
target_nodes
=
nodes
[
int
(
len
(
nodes
)
/
2
):]
...
...
This diff is collapsed.
Click to expand it.
evaluation/run.py
+
3
−
0
View file @
057cfd43
import
argparse
import
argparse
import
pickle
import
pickle
import
datetime
import
json
import
json
import
logging
import
logging
from
time
import
perf_counter
from
time
import
perf_counter
...
@@ -66,6 +67,8 @@ if __name__ == '__main__':
...
@@ -66,6 +67,8 @@ if __name__ == '__main__':
r
=
base
.
joinpath
(
'
results
'
)
r
=
base
.
joinpath
(
'
results
'
)
r
.
mkdir
(
exist_ok
=
True
)
r
.
mkdir
(
exist_ok
=
True
)
r
=
r
.
joinpath
(
datetime
.
datetime
.
now
().
isoformat
())
r
.
mkdir
()
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
path
:
Path
path
:
Path
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment