-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
33 lines (19 loc) · 823 Bytes
/
plot.py
File metadata and controls
33 lines (19 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import sys
import os
import importlib
import time
from abpy import management
import numpy
if __name__ == "__main__":
config_file = sys.argv[1]
c = importlib.import_module("config." + config_file)
print(time.strftime("%I:%M:%S", time.localtime()) + " PLOTTING: " + config_file, flush=True)
em = management.ExecutionManager(c.config, 1, True)
em.config.agent_aggregator_functions = {"AVG": lambda v: numpy.mean(v), "MED": lambda v: numpy.median(v)}
em.config.run_aggregator_functions = {"AVG": lambda v: numpy.mean(v), "MED": lambda v: numpy.median(v)}
em.generate_runs()
em.plot_scenario_comparison()
#em.plot_timeseries()
#em.plot_param_var()
#em.plot_histograms()
print(time.strftime("%I:%M:%S", time.localtime()) + " TERMINATED: " + config_file, flush=True)