-
Notifications
You must be signed in to change notification settings - Fork 0
/
execute_all.py
64 lines (48 loc) · 1.59 KB
/
execute_all.py
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
## Copyright 2023-4 Tom Brown
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU Affero General Public License as
## published by the Free Software Foundation; either version 3 of the
## License, or (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU Affero General Public License for more details.
## License and more information at:
## https://github.com/PyPSA/nowcast
import os, sys
scripts_generic = [
"download_data_smard.py",
"correct_data_smard.py",
"plot_today.py",
"generate_costs.py",
"download_temperature.py",
"build_cop.py",
"build_heat_demand.py",
"build_bev_profile.py",
]
scripts_post = [
"generate_index.py"
]
scripts_scenario = [
"solve_myopic.py",
"plot_networks.py",
"generate_html.py",
]
scenario_fns = []
for fn in os.listdir("./"):
if fn[:9] == "scenario-" and fn[-5:] == ".yaml":
scenario_fns.append(fn)
print(scenario_fns)
for script in scripts_generic:
command = f"{sys.executable} {script}"
print(f"executing {command}")
os.system(command)
for scenario_fn in scenario_fns:
for script in scripts_scenario:
command = f"{sys.executable} {script} {scenario_fn}"
print(f"executing {command}")
os.system(command)
for script in scripts_post:
command = f"{sys.executable} {script}"
print(f"executing {command}")
os.system(command)