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

Function MathOptInterface.ScalarQuadraticFunction{Float64} is not supported. #84

Closed
tmigot opened this issue Sep 21, 2021 · 7 comments
Closed

Comments

@tmigot
Copy link
Member

tmigot commented Sep 21, 2021

I am suspecting this is related to #50, there is this warning in OptimizationProblems.jl and the resulting NLPModel has no constraints, while the JuMP model seems to be ok.

using OptimizationProblems
using NLPModelsJuMP

prob = :hs61
prob_fn = eval(Meta.parse("OptimizationProblems.PureJuMP.$(prob)"))
nlp_jump = MathOptNLPModel(prob_fn())
nlp_jump.meta.ncon # is == 0
@amontoison
Copy link
Member

amontoison commented Sep 27, 2021

@tmigot, a JuMP model with quadratic constraints @constraint are not supported. It only works if you use @NLconstraint.

@tmigot
Copy link
Member Author

tmigot commented Sep 27, 2021

Then, we should modifiy hs61 in OptimizationProblems.jl, no?

@amontoison
Copy link
Member

If it's the only problem with quadratic constraints modeled with @constraint, yes you should update it.

@tmigot
Copy link
Member Author

tmigot commented Sep 27, 2021

Cool, I will open a PR :).

@amontoison
Copy link
Member

It's the only problem with this issue.

for prob in names(OptimizationProblems)
        prob == :OptimizationProblems && continue
        println(prob)
        prob_fn = eval(prob)
        model = prob_fn()
        nlp = MathOptNLPModel(model)
end

@tmigot
Copy link
Member Author

tmigot commented Sep 27, 2021

Yes, I reviewed them in PR 69 and I think so.

@tmigot
Copy link
Member Author

tmigot commented Sep 27, 2021

I misunderstood. This is an NLPModelsJuMP problem and not a JuMP problem, so we don't have to modify OptimizationProblems.jl.
We will have to check-in OptimizationProblems.jl that @NLconstraints are not used in cases with linear or quadratic constraints.

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

No branches or pull requests

2 participants