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

Constraints of type MathOptInterface.VectorAffineFunction{Float64}-in-MathOptInterface.PowerCone{Float64} are not supported by the solver. #66

Closed
freemin7 opened this issue Oct 21, 2022 · 7 comments

Comments

@freemin7
Copy link
Contributor

Minimal working example:

using HiGHS, MadNLP, JuMP, Pavito

oa_solver = optimizer_with_attributes(HiGHS.Optimizer,
    MOI.Silent() => true,
    "mip_feasibility_tolerance" => 1e-8,
    "mip_rel_gap" => 1e-6,
)

madnlp = optimizer_with_attributes(MadNLP.Optimizer,
                 "print_level" => MadNLP.INFO)


opt = optimizer_with_attributes(Pavito.Optimizer,
        "mip_solver" => oa_solver,
        "cont_solver" => madnlp,
    )
mc = Model(opt)

np = 5

@variable(mc, 0 <= q[1:(2*np)] <= Qmax)
@variable(mc, 0 <= hfq[1:(2*np)])

for i in 1:(2np)
  @constraint(mc, [hfq[i]/Resistance[i], 1, q[i]] in MOI.PowerCone(1/1.852))
end
@odow
Copy link
Member

odow commented Oct 23, 2022

Pavito passes your model to the continuous inner solver. In this case, it's MadNLP, which doesn't support PowerCones. Did you expect this to work?

@freemin7
Copy link
Contributor Author

freemin7 commented Oct 23, 2022

I expected to Pavito or some bridge to translate it so an NLP solver can solve it.

"For algorithms that use a conic solver instead of an NLP solver, use Pajarito."

suggested to me that Pavito could take any NLP solver not just Ipopt.

@odow
Copy link
Member

odow commented Oct 23, 2022

I expected to Pavito or some bridge to translate it so an NLP solver can solve it.

We don't do this. You can use Pavito if you write your constraints using @NLconstraint. Otherwise, use Pajarito and a conic solver.

@freemin7
Copy link
Contributor Author

I have been operating under the wrong mental model. Sorry. I will think about a suggestion for the ReadMe which would have prevented that misunderstanding on my end.

@freemin7
Copy link
Contributor Author

Just a clarification. You perform no check that the problem is actually is non convex? How would the solver behave when given a non convex problem?

@odow
Copy link
Member

odow commented Oct 23, 2022

I will think about a suggestion for the ReadMe which would have prevented that misunderstanding on my end.

Open a PR?

You perform no check that the problem is actually is non convex?

No

How would the solver behave when given a non convex problem?

¯_(ツ)_/¯

@freemin7
Copy link
Contributor Author

I will think about a suggestion for the ReadMe which would have prevented that misunderstanding on my end.

Open a PR?

If i thought of something i will.

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

No branches or pull requests

2 participants