lanl-ansi / Alpine.jl

A Julia/JuMP-based Global Optimization Solver for Non-convex Programs
https://lanl-ansi.github.io/Alpine.jl/latest/
Other
244 stars 39 forks source link

Error in convexification of monomials #104

Closed krishpat closed 4 years ago

krishpat commented 5 years ago

Consider this NLP:

m = Model(solver=AlpineSolver(nlp_solver = IpoptSolver(print_level=0), mip_solver = CplexSolver(CPX_PARAM_SCRIND=0)))
@variable(m, -5 <= x[1:2] <= 5)
@NLobjective(m, Min, ((x[1]^2)*(x[1]^2) - 16*x[1]^2 +  (x[2]^2)*(x[2]^2)))
solve(m)

Alpine throws this error

ERROR: LoadError: AssertionError: !(y_idx in keys(λ))

But the same objective when encoded in either of the following forms, Alpine runs fine

@NLobjective(m, Min, ((x[1]^4) - 16*x[1]^2 +  (x[2]^4)))
@NLobjective(m, Min, ((x[1]^3)*(x[1]) - 16*x[1]^2 +  (x[2]^3)*(x[2])))

Tried looking at the code but couldn't locate the source of the bug and hence reporting.

harshangrjn commented 4 years ago

@krishpat This issue has been fixed in v0.2.0 of Alpine. If you have any issues, re-open the issue.