You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following equation (that appear 4 times in the code) contains mistakes that are explained below:
####s.t. TDC2_TotalDiscountedCost{r in REGION, 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])*FixedCost[r,t,y] + sum{m in MODEperTECHNOLOGY[t], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*YearSplit[l,y]*VariableCost[r,t,m,y])/DiscountFactorMid[r,y]+CapitalCost[r,t,y] * NewCapacity[r,t,y]/DiscountFactor[r,y]+DiscountedTechnologyEmissionsPenalty[r,t,y]-DiscountedSalvageValue[r,t,y]) + sum{s in STORAGE} (CapitalCostStorage[r,s,y] * NewStorageCapacity[r,s,y]/DiscountFactor[r,y]-CapitalCostStorage[r,s,y] * NewStorageCapacity[r,s,y]/DiscountFactor[r,y]) = TotalDiscountedCost[r,y];
The storage part of this equation has two mistakes.
It substacts to zero and should instead substract the DiscountedSalvageValueStorage instead of this term: CapitalCostStorage[r,s,y] * NewStorageCapacity[r,s,y]/DiscountFactor[r,y]
Intead of the DiscountFactor[r,y], the DiscountFactorStorage[r,y,s] should be used. Otherwise it doesn't compute.
(In newer version of the code, the DiscountFactor might be replaced by the CapitalRecoveryFactor)
The error is also in the objective function, in the section "Summary Results" and at the bottom of the code in the table TotalDiscountedCostResults.
The error with the use of the DiscountFactor instead of the DiscountFactorStorage also appears in this equation: #s.t. SI9_SalvageValueStorageDiscountedToStartYear[...]
The text was updated successfully, but these errors were encountered:
Timon-R
changed the title
Bug: Storage equations contain mistakes!
Bug: Storage equations (and objective function) contain mistakes!
Dec 13, 2023
Some of the storage equations are wrong:
The following equation (that appear 4 times in the code) contains mistakes that are explained below:
####s.t. TDC2_TotalDiscountedCost{r in REGION, 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])*FixedCost[r,t,y] + sum{m in MODEperTECHNOLOGY[t], l in TIMESLICE} RateOfActivity[r,l,t,m,y]*YearSplit[l,y]*VariableCost[r,t,m,y])/DiscountFactorMid[r,y]+CapitalCost[r,t,y] * NewCapacity[r,t,y]/DiscountFactor[r,y]+DiscountedTechnologyEmissionsPenalty[r,t,y]-DiscountedSalvageValue[r,t,y]) + sum{s in STORAGE} (CapitalCostStorage[r,s,y] * NewStorageCapacity[r,s,y]/DiscountFactor[r,y]-CapitalCostStorage[r,s,y] * NewStorageCapacity[r,s,y]/DiscountFactor[r,y]) = TotalDiscountedCost[r,y];
The storage part of this equation has two mistakes.
(In newer version of the code, the DiscountFactor might be replaced by the CapitalRecoveryFactor)
The error is also in the objective function, in the section "Summary Results" and at the bottom of the code in the table TotalDiscountedCostResults.
The error with the use of the DiscountFactor instead of the DiscountFactorStorage also appears in this equation:
#s.t. SI9_SalvageValueStorageDiscountedToStartYear[...]
The text was updated successfully, but these errors were encountered: