diff --git a/docs/changelog.md b/docs/changelog.md index 0308402..928e702 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,33 @@ # OSeMOSYS Change Log +### Change of ReserveMargin Calculation +The ReserveMargin has so far been calculated in relation to the TimeSlice with the highest demand. +However, often the time slices in OSeMOSYS models do not represent exactly one hour. Therefore this approach +does not reflect the estimation of real world ReserveMargin calculation. +This commit changes the way the ReserveMargin in OSeMOSYS is being calculated. +By introducing the new parameter AnnualPeakHour the modeller needs to enter the demand of the hour with the +highest demand, if one wishes to have a ReserveMargin. Since one commonly has hourly demand data available +when modelling, determining the hour with the highest demand is not creating significatn additional work. +In the different code versions the following modifications have been made: +**long** +- added: + param AnnualPeakHour{r in REGION, y in YEAR} +- modified: + RM1_ReserveMargin_TechnologiesIncluded_In_Activity_Units, + RM3_RM3_ReserveMargin_Constraint +- taken out: + RM2_ReserveMargin_FuelsIncluded +**short** +- added: + param AnnualPeakHour{r in REGION, y in YEAR} +- modified: + RM3_RM3_ReserveMargin_Constraint +**fast** +- added: + param AnnualPeakHour{r in REGION, y in YEAR} +- modified: + RM3_RM3_ReserveMargin_Constraint + ## Version 1.0.0 This is the first stable version of OSeMOSYS to be reduced using the Semantic Versioning pattern diff --git a/src/osemosys.txt b/src/osemosys.txt index 88e0b4e..8f2b8f3 100644 --- a/src/osemosys.txt +++ b/src/osemosys.txt @@ -131,7 +131,7 @@ param TotalTechnologyModelPeriodActivityLowerLimit{r in REGION, t in TECHNOLOGY} ######### Reserve Margin ############# # param ReserveMarginTagTechnology{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0 <= 1; -param ReserveMarginTagFuel{r in REGION, f in FUEL, y in YEAR} binary; +param YearlyPeakCapacity{r in REGION, y in YEAR}; param ReserveMargin{r in REGION, y in YEAR}; # ######### RE Generation Target ############# @@ -276,7 +276,7 @@ var ModelPeriodCostByRegion{r in REGION} >= 0; ######### Reserve Margin ############# # var TotalCapacityInReserveMargin{r in REGION, y in YEAR}>= 0; -var DemandNeedingReserveMargin{r in REGION,l in TIMESLICE, y in YEAR}>= 0; +#var DemandNeedingReserveMargin{r in REGION,l in TIMESLICE, y in YEAR}>= 0; # ######### RE Gen Target ############# # @@ -631,14 +631,10 @@ s.t. RM1_ReserveMargin_TechnologiesIncluded_In_Activity_Units{r in REGION, l in = TotalCapacityInReserveMargin[r,y]; -s.t. RM2_ReserveMargin_FuelsIncluded{r in REGION, l in TIMESLICE, y in YEAR: ReserveMargin[r,y] > 0}: - sum {f in FUEL} - RateOfProduction[r,l,f,y] * ReserveMarginTagFuel[r,f,y] - = - DemandNeedingReserveMargin[r,l,y]; +#s.t. RM2_ReserveMargin_FuelsIncluded{r in REGION, l in TIMESLICE, y in YEAR: ReserveMargin[r,y] > 0}: sum {f in FUEL} RateOfProduction[r,l,f,y] * ReserveMarginTagFuel[r,f,y] = DemandNeedingReserveMargin[r,l,y]; s.t. RM3_ReserveMargin_Constraint{r in REGION, l in TIMESLICE, y in YEAR: ReserveMargin[r,y] > 0}: - DemandNeedingReserveMargin[r,l,y] * ReserveMargin[r,y] + YearlyPeakCapacity[r,y] * ReserveMargin[r,y] <= TotalCapacityInReserveMargin[r,y]; diff --git a/src/osemosys_fast.txt b/src/osemosys_fast.txt index 894906d..1dda61f 100644 --- a/src/osemosys_fast.txt +++ b/src/osemosys_fast.txt @@ -132,7 +132,7 @@ param TotalTechnologyModelPeriodActivityLowerLimit{r in REGION, t in TECHNOLOGY} ######### Reserve Margin ############# param ReserveMarginTagTechnology{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0 <= 1; -param ReserveMarginTagFuel{r in REGION, f in FUEL, y in YEAR} binary; +param YearlyPeakCapacity{r in REGION, y in YEAR}; param ReserveMargin{r in REGION, y in YEAR}; # ######### RE Generation Target ############# @@ -513,7 +513,7 @@ s.t. TAC3_TotalModelHorizenTechnologyActivityLowerLimit{r in REGION, t in TECHNO # ######### Reserve Margin Constraint ############## NTS: Should change demand for production # -s.t. RM3_ReserveMargin_Constraint{r in REGION, l in TIMESLICE, y in YEAR}: sum{f in FUEL, (m,t) in MODExTECHNOLOGYperFUELout[f]} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] * ReserveMarginTagFuel[r,f,y] * ReserveMargin[r,y]<= sum {t in TECHNOLOGY} ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) * ReserveMarginTagTechnology[r,t,y] * CapacityToActivityUnit[r,t]; +s.t. RM3_ReserveMargin_Constraint{r in REGION, y in YEAR}: YearlyPeakCapacity[r,y]*ReserveMargin[r,y]<=sum{t in TECHNOLOGY} ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) * ReserveMarginTagTechnology[r,t,y] ; #s.t. RM1_ReserveMargin_TechnologiesIncluded_In_Activity_Units{r in REGION, l in TIMESLICE, y in YEAR}: sum {t in TECHNOLOGY} ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) * ReserveMarginTagTechnology[r,t,y] * CapacityToActivityUnit[r,t] = TotalCapacityInReserveMargin[r,y]; #s.t. RM2_ReserveMargin_FuelsIncluded{r in REGION, l in TIMESLICE, y in YEAR}: sum{(m,t) in MODExTECHNOLOGYperFUELout[f], f in FUEL} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] * ReserveMarginTagFuel[r,f,y] = DemandNeedingReserveMargin[r,l,y]; # diff --git a/src/osemosys_short.txt b/src/osemosys_short.txt index 190a4a4..e528728 100644 --- a/src/osemosys_short.txt +++ b/src/osemosys_short.txt @@ -128,7 +128,7 @@ param TotalTechnologyModelPeriodActivityLowerLimit{r in REGION, t in TECHNOLOGY} ######### Reserve Margin ############# # param ReserveMarginTagTechnology{r in REGION, t in TECHNOLOGY, y in YEAR} >= 0 <= 1; -param ReserveMarginTagFuel{r in REGION, f in FUEL, y in YEAR} binary; +param YearlyPeakCapacity{r in REGION, y in YEAR}; param ReserveMargin{r in REGION, y in YEAR}; # ######### RE Generation Target ############# @@ -473,7 +473,7 @@ s.t. TAC3_TotalModelHorizenTechnologyActivityLowerLimit{r in REGION, t in TECHNO # ######### Reserve Margin Constraint ############## NTS: Should change demand for production # -s.t. RM3_ReserveMargin_Constraint{r in REGION, l in TIMESLICE, y in YEAR}: sum{m in MODE_OF_OPERATION, t in TECHNOLOGY, f in FUEL: OutputActivityRatio[r,t,f,m,y] <>0} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] * ReserveMarginTagFuel[r,f,y] * ReserveMargin[r,y]<= sum {t in TECHNOLOGY} ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) * ReserveMarginTagTechnology[r,t,y] * CapacityToActivityUnit[r,t]; +s.t. RM3_ReserveMargin_Constraint{r in REGION, y in YEAR}: YearlyPeakCapacity[r,y]*ReserveMargin[r,y]<=sum{t in TECHNOLOGY} ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) * ReserveMarginTagTechnology[r,t,y]; #s.t. RM1_ReserveMargin_TechnologiesIncluded_In_Activity_Units{r in REGION, l in TIMESLICE, y in YEAR}: sum {t in TECHNOLOGY} ((sum{yy in YEAR: y-yy < OperationalLife[r,t] && y-yy>=0} NewCapacity[r,t,yy])+ ResidualCapacity[r,t,y]) * ReserveMarginTagTechnology[r,t,y] * CapacityToActivityUnit[r,t] = TotalCapacityInReserveMargin[r,y]; #s.t. RM2_ReserveMargin_FuelsIncluded{r in REGION, l in TIMESLICE, y in YEAR}: sum{m in MODE_OF_OPERATION, t in TECHNOLOGY, f in FUEL: OutputActivityRatio[r,t,f,m,y] <>0} RateOfActivity[r,l,t,m,y]*OutputActivityRatio[r,t,f,m,y] * ReserveMarginTagFuel[r,f,y] = DemandNeedingReserveMargin[r,l,y]; # diff --git a/tests/utopia.txt b/tests/utopia.txt index 80dbf2a..47e7baa 100644 --- a/tests/utopia.txt +++ b/tests/utopia.txt @@ -128,6 +128,12 @@ SN 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0. WD 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 WN 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 ; +# +# YearlyPeakCapacity{r in REGION, y in YEAR} Units: PJ +# Indicates the electricity demand in the hour of the highest demand in the year +param YearlyPeakCapacity default 0 : 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 := +UTOPIA 0.005677568 0.005961446 0.006245325 0.006529203 0.006813081 0.00709696 0.007380838 0.007664716 0.007948595 0.008232473 0.008516352 0.008942169 0.009367987 0.009793804 0.010219622 0.01064544 0.011071257 0.011497075 0.011922892 0.01234871 0.012774527 ; + # # CapacityToActivityUnit{r in REGION, t in TECHNOLOGY}; Units: PJ/GW-YR # Thus here we use a factor of 31.536, which is the level of energy production in PJ produced from 1 GW operating for 1 year (1GW * 8760 * 3600 / 10^6) @@ -368,13 +374,6 @@ param EmissionsPenalty := CO2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NOX 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; -# -# ReserveMarginTagFuel{r in Region,f in Fuel, y in Year} Units: 1=yes, 0=no -# Indicates if the output fuel has a reserve margin associated with it -param ReserveMarginTagFuel default 0 := - [UTOPIA,*,*] : 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 := -ELC 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ; - # # ReserveMargin{r in Region, y in Year} Units: Ratio (Installed/Peak) # The reserve (installed) capacity required relative to the peak demand for the specified fuel.