diff --git a/CHANGELOG.md b/CHANGELOG.md index 22e8acad8a..f37e4b45ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). diff --git a/src/multi_stage/dual_dynamic_programming.jl b/src/multi_stage/dual_dynamic_programming.jl index 92f9791eb3..b3e2c23c14 100644 --- a/src/multi_stage/dual_dynamic_programming.jl +++ b/src/multi_stage/dual_dynamic_programming.jl @@ -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