jump-dev / HiGHS.jl

A Julia interface to the HiGHS solver
https://highs.dev
MIT License
97 stars 13 forks source link

Add support for MOI.AbsoluteGapTolerance and MOI.RelativeGapTolerance #169

Closed matbesancon closed 10 months ago

matbesancon commented 10 months ago

adds the absolute and relative gap limit attributes to HiGHS.

matbesancon commented 10 months ago

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

matbesancon commented 10 months ago

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 commented 10 months ago

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.