From a6b28e8854fa3b7942557845d696c13640be1a9d Mon Sep 17 00:00:00 2001 From: Hauke Henke Date: Thu, 19 Nov 2020 10:58:26 +0100 Subject: [PATCH 1/9] Implemented a peak-load related ReserveMargin in OSeMOSYS fast --- src/osemosys_fast.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osemosys_fast.txt b/src/osemosys_fast.txt index 894906d..f2d7c6f 100644 --- a/src/osemosys_fast.txt +++ b/src/osemosys_fast.txt @@ -81,6 +81,7 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; +param AnnualPeakHour{r in Region, y in YEAR}; # ######### Performance ############# # @@ -513,7 +514,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}: AnnualPeakHour[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]; # From 12cafc859056dfac0ef5dadbbb7a6a87b2e99849 Mon Sep 17 00:00:00 2001 From: Hauke Henke Date: Thu, 19 Nov 2020 11:31:21 +0100 Subject: [PATCH 2/9] Implemented a peak-load related ReserveMargin in OSeMOSYS short. --- src/osemosys_short.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osemosys_short.txt b/src/osemosys_short.txt index 190a4a4..0eb063f 100644 --- a/src/osemosys_short.txt +++ b/src/osemosys_short.txt @@ -78,6 +78,7 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; +param AnnualPeakHour{r in Region, y in YEAR}; # ######### Performance ############# # @@ -473,7 +474,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}: AnnualPeakHour[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]; # From 56fa62d9ff400dd9d8622a50107ba006614fe80d Mon Sep 17 00:00:00 2001 From: Hauke Henke Date: Thu, 19 Nov 2020 12:02:19 +0100 Subject: [PATCH 3/9] Implemented a peak-load related ReserveMargin in OSeMOSYS. --- src/osemosys.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/osemosys.txt b/src/osemosys.txt index 88e0b4e..25d9234 100644 --- a/src/osemosys.txt +++ b/src/osemosys.txt @@ -81,6 +81,7 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; +param AnnualPeakHour{r in Region, y in YEAR}; # ######### Performance ############# # @@ -276,7 +277,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 +632,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] + AnnualPeakHour[r,y] * ReserveMargin[r,y] <= TotalCapacityInReserveMargin[r,y]; From 2ad449f5b86f005b0be5d92866d9a83cdecc31c4 Mon Sep 17 00:00:00 2001 From: Hauke Henke Date: Thu, 19 Nov 2020 12:34:41 +0100 Subject: [PATCH 4/9] Added description of changes to ReserveMargin to changelog file. --- docs/changelog.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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 From 62a55f8e6c1aacba8fb5d8c648841d1206010b2e Mon Sep 17 00:00:00 2001 From: Hauke Henke Date: Tue, 22 Dec 2020 17:15:21 +0100 Subject: [PATCH 5/9] Corrected the spelling of Region to REGION in AnnualPeakHour. --- src/osemosys.txt | 2 +- src/osemosys_fast.txt | 2 +- src/osemosys_short.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osemosys.txt b/src/osemosys.txt index 25d9234..54481d3 100644 --- a/src/osemosys.txt +++ b/src/osemosys.txt @@ -81,7 +81,7 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; -param AnnualPeakHour{r in Region, y in YEAR}; +param AnnualPeakHour{r in REGION, y in YEAR}; # ######### Performance ############# # diff --git a/src/osemosys_fast.txt b/src/osemosys_fast.txt index f2d7c6f..b42ee31 100644 --- a/src/osemosys_fast.txt +++ b/src/osemosys_fast.txt @@ -81,7 +81,7 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; -param AnnualPeakHour{r in Region, y in YEAR}; +param AnnualPeakHour{r in REGION, y in YEAR}; # ######### Performance ############# # diff --git a/src/osemosys_short.txt b/src/osemosys_short.txt index 0eb063f..dff4095 100644 --- a/src/osemosys_short.txt +++ b/src/osemosys_short.txt @@ -78,7 +78,7 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; -param AnnualPeakHour{r in Region, y in YEAR}; +param AnnualPeakHour{r in REGION, y in YEAR}; # ######### Performance ############# # From e920e98c573824a6951ee83abbcc783e3115f4c9 Mon Sep 17 00:00:00 2001 From: Hauke Henke Date: Tue, 22 Dec 2020 17:38:07 +0100 Subject: [PATCH 6/9] modified data related to reserve margin in utopia to work with new RM. The AnnualPeakHour is reverse calculated and corresponds to the demand per hour in the time slice with the highest per hour demand. --- tests/utopia.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/utopia.txt b/tests/utopia.txt index 80dbf2a..581b801 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 ; +# +# AnnualPeakHour{r in REGION, y in YEAR} Units: PJ +# Indicates the electricity demand in the hour of the highest demand in the year +param AnnualPeakHour 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.000959 0.00100695 0.0010549 0.00110285 0.0011508 0.00119875 0.0012467 0.00129465 0.0013426 0.00139055 0.0014385 0.001510425 0.00158235 0.001654275 0.0017262 0.001798125 0.00187005 0.001941975 0.0020139 0.002085825 0.00215775 ; + # # 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. From 73454f8b187779efa28ee9d0530d23eb18a024fa Mon Sep 17 00:00:00 2001 From: Hauke Henke Date: Tue, 22 Dec 2020 18:50:08 +0100 Subject: [PATCH 7/9] Added RH electricity demand into calculation for the RM. --- tests/utopia.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utopia.txt b/tests/utopia.txt index 581b801..28525a8 100644 --- a/tests/utopia.txt +++ b/tests/utopia.txt @@ -132,7 +132,7 @@ 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. # AnnualPeakHour{r in REGION, y in YEAR} Units: PJ # Indicates the electricity demand in the hour of the highest demand in the year param AnnualPeakHour 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.000959 0.00100695 0.0010549 0.00110285 0.0011508 0.00119875 0.0012467 0.00129465 0.0013426 0.00139055 0.0014385 0.001510425 0.00158235 0.001654275 0.0017262 0.001798125 0.00187005 0.001941975 0.0020139 0.002085825 0.00215775 ; +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 From 6b81b46da0ba9289e8ffd054bebef2011e8c8615 Mon Sep 17 00:00:00 2001 From: HauHe Date: Fri, 9 Jun 2023 11:38:01 +0200 Subject: [PATCH 8/9] Updated name of Peak Capacity needed to YearlyPeakCapacity --- src/osemosys.txt | 5 ++--- src/osemosys_fast.txt | 5 ++--- src/osemosys_short.txt | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/osemosys.txt b/src/osemosys.txt index 54481d3..8f2b8f3 100644 --- a/src/osemosys.txt +++ b/src/osemosys.txt @@ -81,7 +81,6 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; -param AnnualPeakHour{r in REGION, y in YEAR}; # ######### Performance ############# # @@ -132,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 ############# @@ -635,7 +634,7 @@ s.t. RM1_ReserveMargin_TechnologiesIncluded_In_Activity_Units{r in REGION, l in #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}: - AnnualPeakHour[r,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 b42ee31..1dda61f 100644 --- a/src/osemosys_fast.txt +++ b/src/osemosys_fast.txt @@ -81,7 +81,6 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; -param AnnualPeakHour{r in REGION, y in YEAR}; # ######### Performance ############# # @@ -133,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 ############# @@ -514,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, y in YEAR}: AnnualPeakHour[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. 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 dff4095..e528728 100644 --- a/src/osemosys_short.txt +++ b/src/osemosys_short.txt @@ -78,7 +78,6 @@ param DepreciationMethod{r in REGION}; param SpecifiedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; param SpecifiedDemandProfile{r in REGION, f in FUEL, l in TIMESLICE, y in YEAR}; param AccumulatedAnnualDemand{r in REGION, f in FUEL, y in YEAR}; -param AnnualPeakHour{r in REGION, y in YEAR}; # ######### Performance ############# # @@ -129,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 ############# @@ -474,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, y in YEAR}: AnnualPeakHour[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. 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]; # From 7137606a795690edb875d95a8af7243d1ae9b376 Mon Sep 17 00:00:00 2001 From: HauHe Date: Fri, 9 Jun 2023 11:45:33 +0200 Subject: [PATCH 9/9] Updated name of peak demand to YearlyPeakCapacity. --- tests/utopia.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/utopia.txt b/tests/utopia.txt index 28525a8..47e7baa 100644 --- a/tests/utopia.txt +++ b/tests/utopia.txt @@ -129,9 +129,9 @@ 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. 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 ; # -# AnnualPeakHour{r in REGION, y in YEAR} Units: PJ +# YearlyPeakCapacity{r in REGION, y in YEAR} Units: PJ # Indicates the electricity demand in the hour of the highest demand in the year -param AnnualPeakHour default 0 : 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 := +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 ; #