GenXProject / GenX.jl

GenX: a configurable power system capacity expansion model for studying low-carbon energy futures. More details at : https://genx.mit.edu
https://genxproject.github.io/GenX.jl/
GNU General Public License v2.0
262 stars 105 forks source link

Fix update of starting transmission capacity in multistage GenX #634

Closed filippopecci closed 5 months ago

filippopecci commented 5 months ago

Fixing bug in function fix_initial_investments, introduced by https://github.com/GenXProject/GenX/pull/326 . The aim of this PR was to set the initial capacity at stage t using the available capacity in stage t-1 only for generators whose indices are in RET_CAP.

However, fix_initial_investments does not consider only generators, but also transmission lines. So if the index of a given transmission line does not happen to be in RET_CAP, the available capacity of that transmission line at stage t-1 will not be carried over to stage t.

As a result of this bug, GenX believes that it has not built any transmission capacity in previous stages for those lines whose indices are not in RET_CAP, and so in every stage after the first one GenX will build a lot more transmission capacity than it should.