Skip to content

Conversation

dourouc05
Copy link
Contributor

Fixes #1600.

If you are OK with the wording, the same patch could be applied to ConstraintDual, ConstraintBasisStatus, ObjectiveValue, DualObjectiveValue, VariableBasisStatus, ConstraintPrimal.

Copy link
Member

@odow odow left a 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.

@dourouc05
Copy link
Contributor Author

I added the comment (with the required adaptations, as far as I can see) for the other mentioned attributes.

Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@blegat blegat left a 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:

  1. result_index > MOI.get(model, MOI.ResultCount()). In that case,ResultIndexBoundsError should be thrown.
  2. 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)

@dourouc05
Copy link
Contributor Author

@blegat I reformulated for ObjectiveValue, is this better now? (I also added some docs for ResultIndexBoundsError, so that I can reference to it.)

@dourouc05
Copy link
Contributor Author

I have adapted the new paragraph for the other attributes.

@odow odow merged commit e6eadeb into jump-dev:master Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[docs/convention] VariablePrimal: what should solvers return when there is no solution?
3 participants