Skip to content

Commit

Permalink
Merge pull request #1 from squoilin/master
Browse files Browse the repository at this point in the history
Updates for version 2.2
  • Loading branch information
squoilin committed Oct 15, 2017
2 parents 7b6d0f4 + c19c438 commit dbaddcf
Show file tree
Hide file tree
Showing 26 changed files with 18,190 additions and 9,118 deletions.
Binary file modified ConfigFiles/ConfigCY.xlsx
Binary file not shown.
17,520 changes: 8,760 additions & 8,760 deletions Database/AvailabilityFactors/CY/1h/2015.csv

Large diffs are not rendered by default.

8,761 changes: 8,761 additions & 0 deletions Database/Heat_demand/CY/vassilikos_chp_p2h.csv

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions Database/PowerPlants/CY/2015_heat.csv
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
,PowerCapacity,Type,Unit,Zone,Technology,Fuel,JRC_id,Efficiency,MinUpTime,MinDownTime,RampUpRate,RampDownRate,StartUpCost,NoLoadCost,RampingCost,PartLoadMin,MinEfficiency,StartUpTime,CO2Intensity,CHPType,CHPPowerToHeat,CHPPowerLossFactor,STOCapacity,STOSelfDischarge,STOMaxChargingPower,STOChargingEfficiency
1,37.5,Fossil Gas,M07GTG_1-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,
2,37.5,Fossil Gas,M08GTG_2-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,
3,37.5,Fossil Gas,M09GTG_3-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,
4,37.5,Fossil Gas,M10GTG_4-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,
5,60,Fossil Gas,D1STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,
6,60,Fossil Gas,D2STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,
7,60,Fossil Gas,D3STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,
8,60,Fossil Gas,D4STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,
9,60,Fossil Gas,D5STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,
10,60,Fossil Gas,D6STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,
11,17.48,Internal Combustion Engine,DICE1-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,
12,17.48,Internal Combustion Engine,DICE2-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,
13,17.48,Internal Combustion Engine,DICE3-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,
14,17.07,Internal Combustion Engine,DICE4-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,
15,17.07,Internal Combustion Engine,DICE5-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,
16,17.07,Internal Combustion Engine,DICE6-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,
17,130,Fossil Gas,V1STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,
18,130,Fossil Gas,V2STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,
19,130,Fossil Gas,V3STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,
20,37.5,Fossil Gas,V-GTG-37.5MW,CY,GTUR,OIL,0,0.306,,,0.1333,0.1333,2500,240,0,0.106,0.1522,0,0,,,,,,,
21,216,Fossil Gas,Vasilikos CCCP1,CY,COMC,OIL,0,0.4868,6,,0.027272727,0.027272727,17500,870,0,0.272727273,0.4793,0,0,,,,,,,
22,216,Fossil Gas,Vasilikos CCCP2,CY,COMC,OIL,0,0.4868,6,,0.027272727,0.027272727,17500,870,0,0.272727273,0.4793,0,0,Extraction,1,0.18,1500,0.03,,
23,147,Wind Onshore,DispaSET WindOn_CY,CY,WTON,WIN,0,1,0,0,0.1080864692,0.1080864692,0,0,0,0,1,0,0,,,,,,,
24,61,Photovoltaic,DispaSET PHOT_CY,CY,PHOT,SUN,0,1,0,0,0.3047748053,0.3047748053,0,0,0,0,1,0,0,,,,,,,
,PowerCapacity,Type,Unit,Zone,Technology,Fuel,JRC_id,Efficiency,MinUpTime,MinDownTime,RampUpRate,RampDownRate,StartUpCost,NoLoadCost,RampingCost,PartLoadMin,MinEfficiency,StartUpTime,CO2Intensity,CHPType,CHPPowerToHeat,CHPPowerLossFactor,STOCapacity,STOSelfDischarge,STOMaxChargingPower,STOChargingEfficiency,CHPMaxHeat
1,37.5,Fossil Gas,M07GTG_1-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
2,37.5,Fossil Gas,M08GTG_2-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
3,37.5,Fossil Gas,M09GTG_3-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
4,37.5,Fossil Gas,M10GTG_4-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
5,60,Fossil Gas,D1STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
6,60,Fossil Gas,D2STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
7,60,Fossil Gas,D3STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
8,60,Fossil Gas,D4STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
9,60,Fossil Gas,D5STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
10,60,Fossil Gas,D6STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
11,17.48,Internal Combustion Engine,DICE1-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,,
12,17.48,Internal Combustion Engine,DICE2-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,,
13,17.48,Internal Combustion Engine,DICE3-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,,
14,17.07,Internal Combustion Engine,DICE4-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,,
15,17.07,Internal Combustion Engine,DICE5-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,,
16,17.07,Internal Combustion Engine,DICE6-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,,
17,130,Fossil Gas,V1STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,,
18,130,Fossil Gas,V2STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,,
19,130,Fossil Gas,V3STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,,
20,37.5,Fossil Gas,V-GTG-37.5MW,CY,GTUR,OIL,0,0.306,,,0.1333,0.1333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
21,216,Fossil Gas,Vasilikos CCCP1,CY,COMC,OIL,0,0.4868,6,,0.027272727,0.027272727,17500,870,0,0.272727273,0.4793,0,0,,,,,,,,
22,216,Fossil Gas,Vasilikos CCCP2,CY,COMC,OIL,0,0.4868,6,,0.027272727,0.027272727,17500,870,0,0.272727273,0.4793,0,0,Extraction,1,0.18,1500,0.03,,,150
23,147,Wind Onshore,DispaSET WindOn_CY,CY,WTON,WIN,0,1,0,0,0.1080864692,0.1080864692,0,0,0,0,1,0,0,,,,,,,,
24,61,Photovoltaic,DispaSET PHOT_CY,CY,PHOT,SUN,0,1,0,0,0.3047748053,0.3047748053,0,0,0,0,1,0,0,,,,,,,,
25 changes: 25 additions & 0 deletions Database/PowerPlants/CY/2015_heatpump.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,PowerCapacity,Type,Unit,Zone,Technology,Fuel,JRC_id,Efficiency,MinUpTime,MinDownTime,RampUpRate,RampDownRate,StartUpCost,NoLoadCost,RampingCost,PartLoadMin,MinEfficiency,StartUpTime,CO2Intensity,CHPType,CHPPowerToHeat,CHPPowerLossFactor,CHPMaxHeat,STOCapacity,STOSelfDischarge,STOMaxChargingPower,STOChargingEfficiency
1,37.5,Fossil Gas,M07GTG_1-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
2,37.5,Fossil Gas,M08GTG_2-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
3,37.5,Fossil Gas,M09GTG_3-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
4,37.5,Fossil Gas,M10GTG_4-37.5MW,CY,GTUR,OIL,0,0.306,,,0.13333,0.13333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
5,60,Fossil Gas,D1STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
6,60,Fossil Gas,D2STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
7,60,Fossil Gas,D3STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
8,60,Fossil Gas,D4STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
9,60,Fossil Gas,D5STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
10,60,Fossil Gas,D6STG-60MW,CY,STUR,OIL,0,0.316,,,0.025,0.0333,10000,30,0,0.4833,0.2867,0,0,,,,,,,,
11,17.48,Internal Combustion Engine,DICE1-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,,
12,17.48,Internal Combustion Engine,DICE2-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,,
13,17.48,Internal Combustion Engine,DICE3-17.48MW,CY,ICEN,OIL,0,0.421,,,0.0572,0.0572,1200,85,0,0.8581,0.4063,0,0,,,,,,,,
14,17.07,Internal Combustion Engine,DICE4-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,,
15,17.07,Internal Combustion Engine,DICE5-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,,
16,17.07,Internal Combustion Engine,DICE6-17.07MW,CY,ICEN,OIL,0,0.421,,,0.0586,0.0586,600,85,0,0.8787,0.4063,0,0,,,,,,,,
17,130,Fossil Gas,V1STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,,
18,130,Fossil Gas,V2STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,,
19,130,Fossil Gas,V3STG1-130MW,CY,STUR,OIL,0,0.4012,,,0.0277,0.0277,20000,60,0,0.4435,0.3676,0,0,,,,,,,,
20,37.5,Fossil Gas,V-GTG-37.5MW,CY,GTUR,OIL,0,0.306,,,0.1333,0.1333,2500,240,0,0.106,0.1522,0,0,,,,,,,,
21,216,Fossil Gas,Vasilikos CCCP1,CY,COMC,OIL,0,0.4868,6,,0.027272727,0.027272727,17500,870,0,0.272727273,0.4793,0,0,p2h,0,0.25,100,800,0.03,,
22,216,Fossil Gas,Vasilikos CCCP2,CY,COMC,OIL,0,0.4868,6,,0.027272727,0.027272727,17500,870,0,0.272727273,0.4793,0,0,Extraction,1,0.18,,800,0.03,,
23,147,Wind Onshore,DispaSET WindOn_CY,CY,WTON,WIN,0,1,0,0,0.108086469,0.108086469,0,0,0,0,1,0,0,,,,,,,,
24,61,Photovoltaic,DispaSET PHOT_CY,CY,PHOT,SUN,0,1,0,0,0.304774805,0.304774805,0,0,0,0,1,0,0,,,,,,,,
30 changes: 24 additions & 6 deletions DispaSET/GAMS/UCM_h.gms
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ Alias(i,ii);
*Parameters as defined in the input file
PARAMETERS
AvailabilityFactor(u,h) [%] Availability factor
CHPPowerLossFactor(chp) [%] Power loss when generating heat
CHPPowerToHeat(chp) [%] Nominal power-to-heat factor
CHPPowerLossFactor(u) [%] Power loss when generating heat
CHPPowerToHeat(u) [%] Nominal power-to-heat factor
CHPMaxHeat(chp) [MW] Maximum heat capacity of chp plant
CHPType
CommittedInitial(u) [n.a.] Initial committment status
Config
Expand Down Expand Up @@ -181,6 +182,7 @@ $LOAD z
$LOAD AvailabilityFactor
$LOAD CHPPowerLossFactor
$LOAD CHPPowerToHeat
$LOAD CHPMaxHeat
$LOAD CHPType
$LOAD Config
$LOAD CostFixed
Expand Down Expand Up @@ -251,6 +253,7 @@ h,
AvailabilityFactor,
CHPPowerLossFactor,
CHPPowerToHeat,
CHPMaxHeat,
CHPType,
Config,
CostFixed,
Expand Down Expand Up @@ -387,7 +390,9 @@ EQ_Objective_function
EQ_CHP_extraction_Pmax
EQ_CHP_extraction
EQ_CHP_backpressure
EQ_CHP_demand_satisfaction,
EQ_CHP_P2H
EQ_CHP_demand_satisfaction
EQ_CHP_max_heat
EQ_Heat_Storage_balance
EQ_Heat_Storage_minimum
EQ_Heat_Storage_level
Expand Down Expand Up @@ -562,12 +567,12 @@ EQ_Demand_balance_2D(n,i)..

*Minimum power output is above the must-run output level for each unit in all periods
EQ_Power_must_run(u,i)..
PowerMustRun(u,i)
*Committed(u,i)
PowerMustRun(u,i) * Committed(u,i) - (StorageInput(u,i) * CHPPowerLossFactor(u) )$(chp(u) and CHPType(u,'Extraction'))
=L=
Power(u,i)
;


*Maximum power output is below the available capacity
EQ_Power_available(u,i)..
Power(u,i)
Expand Down Expand Up @@ -799,11 +804,22 @@ EQ_CHP_backpressure(chp,i)$(CHPType(chp,'Back-Pressure'))..
StorageInput(chp,i) * CHPPowerToHeat(chp)
;

EQ_CHP_P2H(chp,i)$(CHPType(chp,'P2H'))..
Power(chp,i)
=E=
PowerCapacity(chp) - StorageInput(chp,i) * CHPPowerLossFactor(chp)
;

EQ_CHP_max_heat(chp,i)..
StorageInput(chp,i)
=L=
CHPMaxHeat(chp)
;

EQ_CHP_demand_satisfaction(chp,i)..
Heat(chp,i) + HeatSlack(chp,i)
=E=
HeatDemand(chp,i)

;

*Heat Storage balance
Expand Down Expand Up @@ -845,7 +861,9 @@ EQ_Objective_function,
EQ_CHP_extraction_Pmax,
EQ_CHP_extraction,
EQ_CHP_backpressure,
EQ_CHP_P2H,
EQ_CHP_demand_satisfaction,
EQ_CHP_max_heat,
$If not %LPFormulation% == 1 EQ_CostStartUp,
$If not %LPFormulation% == 1 EQ_CostShutDown,
$If %LPFormulation% == 1 EQ_CostRampUp,
Expand Down
2 changes: 1 addition & 1 deletion DispaSET/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging.config
import os

__version__ = "2.2dev"
__version__ = "2.2.0"

# Logging: # TODO: Parametrize in dispacli or external config
_LOGCONFIG = {
Expand Down
2 changes: 1 addition & 1 deletion DispaSET/misc/gdx_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _insert_symbols(gdxHandle, sets, parameters):

for index, value in np.ndenumerate(variable['val']):
# Write line by line if value is non null
if value != 0 and not np.isnan(value):
if value != 0 and not pd.isnull(value):
gdxKeys = [] # All the set values for this line
for i in range(dims):
key = sets[variable['sets'][i]][
Expand Down
2 changes: 1 addition & 1 deletion DispaSET/postprocessing/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ def ds_to_df(inputs):
for p in parameters:
var = parameters[p]
dim = len(var['sets'])
if var['sets'][-1] == 'h' and isinstance(dates, pd.tseries.index.DatetimeIndex) and dim > 1:
if var['sets'][-1] == 'h' and isinstance(dates, pd.DatetimeIndex) and dim > 1:
# if len(dates) != var['val'].shape[-1]:
# sys.exit('The date range in the Config variable (' + str(len(dates)) + ' time steps) does not match the length of the time index (' + str(var['val'].shape[-1]) + ') for variable ' + p)
var['firstrow'] = 5
Expand Down

0 comments on commit dbaddcf

Please sign in to comment.