Skip to content

Commit

Permalink
Merge #633
Browse files Browse the repository at this point in the history
Fix update of starting transmission capacity in multistage GenX
  • Loading branch information
filippopecci authored Feb 14, 2024
2 parents d299266 + b98fd2a commit aed9b9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix access to eELOSSByZone expr before initialization (#541)
- Fix modeling of hydro reservoir with long duration storage (#572).
- Fix computation of cumulative minimum capacity retirements in multistage GenX (#514)
- Fix update of starting transmission capacity in multistage GenX

### Changed

Expand Down
13 changes: 8 additions & 5 deletions src/multi_stage/dual_dynamic_programming.jl
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,14 @@ function fix_initial_investments(EP_prev::Model, EP_cur::Model, start_cap_d::Dic
# and the associated linking constraint name (c) as a value
for (e, c) in start_cap_d
for y in keys(EP_cur[c])
if y[1] in RET_CAP # extract resource integer index value from key
# Set the right hand side value of the linking initial capacity constraint in the current
# stage to the value of the available capacity variable solved for in the previous stages
set_normalized_rhs(EP_cur[c][y], value(EP_prev[e][y]))
end
# Set the right hand side value of the linking initial capacity constraint in the current stage to the value of the available capacity variable solved for in the previous stages
if c == :cExistingTransCap
set_normalized_rhs(EP_cur[c][y], value(EP_prev[e][y]))
else
if y[1] in RET_CAP # extract resource integer index value from key
set_normalized_rhs(EP_cur[c][y], value(EP_prev[e][y]))
end
end
end
end
return EP_cur
Expand Down

0 comments on commit aed9b9a

Please sign in to comment.