Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behavior in cost writing when objective is changed #553

Closed
ml6802 opened this issue Sep 22, 2023 · 3 comments
Closed

Weird behavior in cost writing when objective is changed #553

ml6802 opened this issue Sep 22, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ml6802
Copy link
Collaborator

ml6802 commented Sep 22, 2023

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.

@JesseJenkins JesseJenkins added the bug Something isn't working label Jan 8, 2024
@JesseJenkins
Copy link
Collaborator

JesseJenkins commented Jan 29, 2024

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?

lbonaldo added a commit to lbonaldo/GenX that referenced this issue Feb 1, 2024
cTotal on write_costs is now equal to value(EP[:eObj])
instead of the value of the objective function
@lbonaldo
Copy link
Collaborator

lbonaldo commented Feb 1, 2024

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.

lbonaldo added a commit that referenced this issue Feb 5, 2024
cTotal on write_costs is now equal to value(EP[:eObj])
instead of the value of the objective function
@sambuddhac
Copy link
Collaborator

This is now fixed on develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants