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
270 stars 114 forks source link

Fix write_status with UCommit=1 and Shadow Prices #645

Closed lbonaldo closed 6 months ago

lbonaldo commented 6 months ago

write_status looks for the objective_bound of the model, which might not exist (for example, HiGHS only implements the objective bound for MIPs).

This fix addresses the issue with write_outputs when UCommit = WriteShadowPrices = 1 by moving the linearization and re-optimization of the model immediately after write_status is called.