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

Fix ignoring contingencies when the from bus number is greater than than to bus number #70

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

abhyshr
Copy link
Collaborator

@abhyshr abhyshr commented Nov 9, 2023

Fixes #26

When the from bus number is greater than the to bus number for a branch, the PS branch object stores it in the reverse order. This is done so that the from bus number is always less than to bus number. The reason for doing this is IPOPT complains for Hessian if this is not done. However, this was causing the contingencies with from bus > to bus to be ignored.

Fixed this issue by having the PSGetLine routine check for both the combinations (from bus -- to bus, and to bus -- from bus)

@abhyshr
Copy link
Collaborator Author

abhyshr commented Nov 9, 2023

This change is most likely going to cause test failures for SCOPFLOW if any contingencies were being ignored.

@abhyshr abhyshr force-pushed the scopflow/fix-ignored-contingencies branch from bafd022 to a5af0fc Compare November 16, 2023 23:22
@abhyshr abhyshr self-assigned this Nov 16, 2023
@abhyshr
Copy link
Collaborator Author

abhyshr commented Nov 17, 2023

This is ready for merging.

Copy link
Contributor

@cameronrutherford cameronrutherford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you need to remove -Werror from our Debug builds, but your ps changes are sound

src/utils/CMakeLists.txt Outdated Show resolved Hide resolved
@cameronrutherford cameronrutherford force-pushed the scopflow/fix-ignored-contingencies branch from 043f92b to 91db631 Compare November 21, 2023 03:46
@abhyshr
Copy link
Collaborator Author

abhyshr commented Nov 21, 2023

This is good to merge.

@abhyshr
Copy link
Collaborator Author

abhyshr commented Nov 21, 2023

Closes #26

abhyshr and others added 3 commits November 21, 2023 10:04
…o bus #26

When the from bus number is greater than the to bus number for a branch, the
PS branch object stores it in the reverse order. This is done so that the
from bus number is always less than to bus number. The reason for doing this
is IPOPT complains for Hessian if this is not done. However, this was causing
the contingencies with from bus > to bus to be ignored.
@abhyshr abhyshr force-pushed the scopflow/fix-ignored-contingencies branch from fb36396 to 5bf431c Compare November 21, 2023 16:04
@cameronrutherford cameronrutherford merged commit 25f749e into develop Nov 21, 2023
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 this pull request may close these issues.

[SCOPFLOW] branch contingencies ignored based on to-from bus indices
2 participants