Skip to content

Commit

Permalink
ABHP now properly defined (eff>1 allowed)
Browse files Browse the repository at this point in the history
  • Loading branch information
MPavicevic committed Sep 17, 2021
1 parent baf4a2b commit 88b5f98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dispaset/preprocessing/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def build_single_run(config, profiles=None, PtLDemand=None, MTS=0):
if Plants_merged['Fuel'][unit] == FuelEntry:
if Plants_merged['Technology'][unit] == 'ABHP':
parameters['CostVariable']['val'][unit, :] = FuelPrices[FuelEntries[FuelEntry]][c] / \
1.55 + \
Plants_merged['Efficiency'][unit] + \
Plants_merged['EmissionRate'][unit] * \
FuelPrices['PriceOfCO2'][c]
found = True
Expand Down
10 changes: 6 additions & 4 deletions dispaset/preprocessing/data_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,12 @@ def check_units(config, plants):
for key in higher:
if any(plants[key] > higher[key]):
plantlist = plants[plants[key] > higher[key]]
plantlist = plantlist['Unit'].tolist()
logging.critical('The value of ' + key + ' should be lower or equal to one. '
'A higher value has been found for units ' + str(plantlist))
sys.exit(1)
plantlist = plantlist[~plantlist['Technology'].str.contains("ABHP")]
if not plantlist.empty:
plantlist = plantlist['Unit'].tolist()
logging.critical('The value of ' + key + ' should be lower or equal to one. '
'A higher value has been found for units ' + str(plantlist))
sys.exit(1)

for key in higher_time:
if any(plants[key] >= config['HorizonLength'] * 24):
Expand Down
2 changes: 1 addition & 1 deletion dispaset/preprocessing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def EfficiencyTimeSeries(config, plants, Temperatures):
if plants.loc[u, 'Technology'] in commons['tech_p2ht'] and plants.loc[u,'Tnominal'] in plants:
eff = plants.loc[u, 'COP'] + plants.loc[u, 'coef_COP_a'] * (Temperatures[z] - plants.loc[u, 'Tnominal']) + \
plants.loc[u, 'coef_COP_b'] * (Temperatures[z] - plants.loc[u, 'Tnominal']) ** 2
elif (plants.loc[u, 'Technology'] in commons['tech_p2ht']) and \
elif (plants.loc[u, 'Technology'] in commons['tech_p2ht']) or \
(plants.loc[u, 'Technology'] in commons['tech_heat']):
eff = plants.loc[u, 'COP']
else:
Expand Down

0 comments on commit 88b5f98

Please sign in to comment.