GenXProject / GenX.jl

GenX: a configurable power system capacity expansion model for studying low-carbon energy futures. More details at : https://genx.mit.edu

Home Page:https://genxproject.github.io/GenX.jl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weird behavior in cost writing when objective is changed

ml6802 opened this issue · comments

commented

When running MGA, cost files are not reliable for several reasons, some seem to be intentional and should be upgraded, while others seem buggy.

  • cTotal is based on the value of the objective function, not a separate expression. Making it reliably a separate expression will allow for accurate total cost quantification when running MOO or MGA methods.

  • When MGA is run, other cost numbers look funky too for unclear reasons: examples are:

  1. Sometimes the variable costs come out negative - unclear why

  2. the sum of zonal costs for non cost-optimal runs are occasionally less than those for the cost optimal run. This might be due to system costs not caught in the sum of zonal costs.

Two fixes here.

  1. We need a total cost expression that is used to write cost results, rather than the model objective function. Otherwise, when we change the objective function as we do in MGA or other alternative objective formulations, the costs written will be incorrect. @lbonaldo please fix this as it is straightforward and try to get a bugfix PR into main & develop when complete.

  2. We need to identify source of errors for the variable costs etc. @ml6802 can you please try to replicate this and provide example for debugging?

I created a PR targeting develop to address the first of the two fixes above. @ml6802, could you please test the change with the cases you are running and see if #620 fixes cTotal? If yes, then this bug is not present in main.

This is now fixed on develop