Skip to content

Commit be0c199

Browse files
committed
updated batch-run scripts
1 parent ce9497e commit be0c199

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

scripts/build_and_run_batch.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
"""
88

99
from itertools import product
10-
import cPickle as pickle
10+
import pickle
1111
import logging
1212

13-
import os
14-
os.chdir('..')
13+
# Add the root folder of Dispa-SET to the path so that the library can be loaded:
14+
import sys,os
15+
sys.path.append(os.path.abspath('..'))
1516

1617
# Import Dispa-SET
1718
import dispaset as ds
@@ -20,14 +21,14 @@
2021
path_to_save = r'./scenario_runs'
2122

2223
# Load the configuration file
23-
config = ds.load_config_excel('ConfigFiles/ConfigCY.xlsx')
24+
config = ds.load_config_excel('../ConfigFiles/ConfigCY.xlsx')
2425

2526
# Define your different input files as a list. The number of total runs will be the product of the length of the defined lists.
26-
heat_demand_scen = ['./Database/Heat_demand/CY/Vassilikos_CCP2.csv',
27-
'./Database/Heat_demand/CY/Vassilikos_CCP2.csv_80']
27+
heat_demand_scen = ['../Database/Heat_demand/CY/Vassilikos_CCP2.csv',
28+
'../Database/Heat_demand/CY/Vassilikos_CCP2.csv_80']
2829

29-
power_scen = ['./Database/PowerPlants/##/2015.csv',
30-
'./Database/PowerPlants/##/2015_heat.csv',
30+
power_scen = ['../Database/PowerPlants/##/2015.csv',
31+
'../Database/PowerPlants/##/2015_heat.csv',
3132
]
3233

3334
cost_heat_slack_scen = [20.0, 51.0, 100.0]

scripts/build_and_run_hypercube.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,18 @@
66
For each simulation, a separate simulation environment folder is created and the simualtion is run in GAMS
77
Finally, all the folders with the result files are read and the results are stored in a dataframe exported to excel
88
9-
TODO:
10-
- harmonize reserves and reserve output!
11-
- get back the solver status
12-
- Loadshedding not activated although there is lost load
13-
- bad hatching in dispatch plot and windows
14-
- no horizontal line in bar plots in windows
9+
the pyDOE library is required to run this script!
1510
1611
@author: Sylvain Quoilin
1712
"""
1813
#%%
1914
# Change directory to the root folder of Dispa-SET:
20-
import os
2115
import numpy as np
2216
import pandas as pd
23-
os.chdir('..')
17+
18+
# Add the root folder of Dispa-SET to the path so that the library can be loaded:
19+
import sys,os
20+
sys.path.append(os.path.abspath('..'))
2421

2522
# Import Dispa-SET
2623
import dispaset as ds
@@ -34,10 +31,10 @@
3431
share_pv = [0,0.3] # Yearly PV generation divided by yearly power consumption
3532

3633
# Define the folder in which all simulations should be stored:
37-
sim_folder = 'Simulations/batch/'
34+
sim_folder = '../Simulations/batch/'
3835

3936
# Load the configuration file
40-
config = ds.load_config_excel('ConfigFiles/ConfigBE.xlsx')
37+
config = ds.load_config_excel('../ConfigFiles/ConfigBE.xlsx')
4138

4239
config['SimulationType'] = 'Integer clustering'
4340
# 'Integer clustering'

0 commit comments

Comments
 (0)