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 support for MOI.AbsoluteGapTolerance and MOI.RelativeGapTolerance #169

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

matbesancon
Copy link
Collaborator

adds the absolute and relative gap limit attributes to HiGHS.

@matbesancon
Copy link
Collaborator Author

One thing, I never returned nothing for the gap, since it starts with a default value that is not an obvious flag value (0.001 and 1e-6 for relative and absolute resp.), comparing against it makes the MOI wrapper potentially dependent on the HiGHS version

@odow odow changed the title gap limit Add support for MOI.AbsoluteGapTolerance and MOI.RelativeGapTolerance Sep 5, 2023
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.

We probably should add the nothing, but I understand the motivation not to. This is okay for now.

@matbesancon
Copy link
Collaborator Author

more broadly than this PR, this is a consequence of treating values that have been set differently than the default of the solver (I'm not a big fan of e.g. MOI.ListOfModelAttributesSet because ultimately, it pushes down on most solvers to keep track of what has been set or not if they have a non-flag default value set by default

@odow
Copy link
Member

odow commented Sep 5, 2023

The original motivation for nothing was that some solvers don't have a way of querying the default.

For MOI v2, I think we could make get return nothing OR the solver's default. set(..., nothing) should probably restore the default though.

@matbesancon matbesancon merged commit 09c0cbb into master Sep 5, 2023
4 checks passed
@matbesancon matbesancon deleted the gaplimits branch September 5, 2023 20:55
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.

None yet

2 participants