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

Add RuntimeError for stale non-anticipative variables on feasible scenarios #171

Merged
merged 4 commits into from
Nov 3, 2021

Conversation

bknueven
Copy link
Collaborator

Fixes #170. Given that the solve need to touch every variable at least once when loading it into the model, this safety check on only the nonanticipative variables once per solve should not be onerous.

@DLWoodruff
Copy link
Collaborator

Give me day to look into interaction with probability zero variables.

@bknueven
Copy link
Collaborator Author

Give me day to look into interaction with probability zero variables.

Good catch. I think we need to allow those to pass, as they will likely be stale (but should have a value, I think).

@bknueven
Copy link
Collaborator Author

@DLWoodruff I think I fixed this for zero-probability variables. Maybe the error message for that case could be improved -- I think they still need to have a non-None value attribute to work correctly. But maybe we have established the value should be fixed to zero, which could also be checked here.

Copy link
Collaborator

@DLWoodruff DLWoodruff left a comment

Choose a reason for hiding this comment

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

This looks good to me. I think we should merge this and then make an issue to create a test for it.

mpisppy/spopt.py Outdated Show resolved Hide resolved
@bknueven bknueven merged commit 5e5d6dc into Pyomo:main Nov 3, 2021
@bknueven bknueven deleted the issue170 branch November 3, 2021 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update_W fails to update dual weights in presence of arbitrary nonanticipative variables
2 participants