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

Stand_by_cost is not implemented correctly #792

Closed
1 task done
barazesh opened this issue Nov 29, 2023 · 0 comments · Fixed by #793
Closed
1 task done

Stand_by_cost is not implemented correctly #792

barazesh opened this issue Nov 29, 2023 · 0 comments · Fixed by #793
Labels

Comments

@barazesh
Copy link

Checklist

  • I am using the current master branch or the latest release. Please indicate:

Describe the Bug

The standby cost for generators and links is not implemented correctly and subsequently its not present in the the objective function.

The issue is caused by the way that the feature is implemented. While all the other parts of the objective function are appended together in a list and then merged together, the standby cost is added to the objective function directly. The problem is that this is done before the other parts of the objective function are merged and therefore its gets overwritten

Possible solutions

As far as I see, this issue can be solved in two ways:
-either the method of adding the standby cost to the objective function is harmonized with the rest of the code in

m.objective = m.objective + (status * stand_by_cost).sum()

-or if there is a specific reason for this feature to be written in this manner, it can just be moved down after the construction of the objective function in

m.objective = sum(objective) if is_quadratic else merge(objective)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant