-
Notifications
You must be signed in to change notification settings - Fork 94
VariablePrimal: document undefined behaviour #1601
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah adding this to other attributes is a good idea.
Present on all other attributes, save this one.
I added the comment (with the required adaptations, as far as I can see) for the other mentioned attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is two cases here:
result_index
>MOI.get(model, MOI.ResultCount())
. In that case,ResultIndexBoundsError
should be thrown.result_index
<=MOI.get(model, MOI.ResultCount())
but only one of the dual and primal are available. In that case, it is undefined indeed.
With the current wording, it is confusing and not clear you are only talking about case 2)
@blegat I reformulated for |
I have adapted the new paragraph for the other attributes. |
Fixes #1600.
If you are OK with the wording, the same patch could be applied to
ConstraintDual
,ConstraintBasisStatus
,ObjectiveValue
,DualObjectiveValue
,VariableBasisStatus
,ConstraintPrimal
.