Skip to content

Commit

Permalink
Merge #634
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
1 parent 47bda69 commit 5db2fcb
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 @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix scaling of transmission losses in write_transmission_losses.jl (#621)
- Fix cost assignment to virtual storage charge/discharge - issue #604 (#608)
- Fix modeling of hydro reservoir with long duration storage (#572).
- Fix update of starting transmission capacity in multistage GenX

### Changed
- Use add_to_expression! instead of the += and -= operators for memory performance improvements (#498).
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 @@ -362,11 +362,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 ALL_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 ALL_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 5db2fcb

Please sign in to comment.