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

set_binary notworking if solver = ipm #241

Closed
joaquimg opened this issue Oct 22, 2024 · 4 comments · Fixed by #242
Closed

set_binary notworking if solver = ipm #241

joaquimg opened this issue Oct 22, 2024 · 4 comments · Fixed by #242

Comments

@joaquimg
Copy link
Member

m = Model(optimizer_with_attributes(HiGHS.Optimizer, "solver"=>"ipm"))
@variable(m, x)
set_binary(x)
ERROR: Constraints of type MathOptInterface.VariableIndex-in-MathOptInterface.ZeroOne are not supported by the solver.

If you expected the solver to support your problem, you may have an error in your formulation. Otherwise, consider using a different solver.

The list of available solvers, along with the problem types they support, is available at https://jump.dev/JuMP.jl/stable/installation/#Supported-solvers.
@odow
Copy link
Member

odow commented Oct 22, 2024

We should probably remove this:

HiGHS.jl/src/MOI_wrapper.jl

Lines 2412 to 2418 in 201cbed

function MOI.supports_constraint(
model::Optimizer,
::Type{MOI.VariableIndex},
::Type{<:Union{MOI.ZeroOne,MOI.Integer}},
)
solver = MOI.get(model, MOI.RawOptimizerAttribute("solver"))
return solver != "simplex" && solver != "ipm"

But the solution for you is to remove the ipm option.

@joaquimg
Copy link
Member Author

Did you git-blame that?
it seems uncommon to have such a check.

@joaquimg
Copy link
Member Author

I might also has fallen in the issue: "HiGHS is hanging on windows". I think it was solved recently

@odow
Copy link
Member

odow commented Oct 23, 2024

The blame was me way back in #50.

Present-self does not agree with the decision that past-self made.

I think it was solved recently

Yip. Update to the latest [email protected] and [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants