Skip to content

Commit

Permalink
updated batch-run scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
squoilin committed Feb 4, 2020
1 parent ce9497e commit be0c199
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
17 changes: 9 additions & 8 deletions scripts/build_and_run_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
"""

from itertools import product
import cPickle as pickle
import pickle
import logging

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

# Import Dispa-SET
import dispaset as ds
Expand All @@ -20,14 +21,14 @@
path_to_save = r'./scenario_runs'

# Load the configuration file
config = ds.load_config_excel('ConfigFiles/ConfigCY.xlsx')
config = ds.load_config_excel('../ConfigFiles/ConfigCY.xlsx')

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

power_scen = ['./Database/PowerPlants/##/2015.csv',
'./Database/PowerPlants/##/2015_heat.csv',
power_scen = ['../Database/PowerPlants/##/2015.csv',
'../Database/PowerPlants/##/2015_heat.csv',
]

cost_heat_slack_scen = [20.0, 51.0, 100.0]
Expand Down
17 changes: 7 additions & 10 deletions scripts/build_and_run_hypercube.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@
For each simulation, a separate simulation environment folder is created and the simualtion is run in GAMS
Finally, all the folders with the result files are read and the results are stored in a dataframe exported to excel
TODO:
- harmonize reserves and reserve output!
- get back the solver status
- Loadshedding not activated although there is lost load
- bad hatching in dispatch plot and windows
- no horizontal line in bar plots in windows
the pyDOE library is required to run this script!
@author: Sylvain Quoilin
"""
#%%
# Change directory to the root folder of Dispa-SET:
import os
import numpy as np
import pandas as pd
os.chdir('..')

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

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

# Define the folder in which all simulations should be stored:
sim_folder = 'Simulations/batch/'
sim_folder = '../Simulations/batch/'

# Load the configuration file
config = ds.load_config_excel('ConfigFiles/ConfigBE.xlsx')
config = ds.load_config_excel('../ConfigFiles/ConfigBE.xlsx')

config['SimulationType'] = 'Integer clustering'
# 'Integer clustering'
Expand Down

0 comments on commit be0c199

Please sign in to comment.