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

Local MINLP solver #137

Closed asavasci closed 1 year ago

asavasci commented 4 years ago

Hi, I am trying to solve an MINLP problem, but I am getting error output below

LoadError: Problem is a MINLP and no MINLP local solver given; use minlp_solver to specify a MINLP local solver in expression starting at...

I tried to use Juniper as local minlp_solver, however, it seems not working with JuMP v0.18, and if I upgrade JuMP, Alpine will not be working.

What would you suggest to work around this?

ccoffrin commented 4 years ago

This is indeed an issue with the incompatible versions of JuMP that are supported by Alpine and Juniper. You can try pinning Juniper to v0.3, which was the last version that supported JuMP v0.18, and it should should still with the current version of Alpine.

asavasci commented 4 years ago

I pinned JuMP and Juniper as follows [4076af6c] JuMP v0.18.6 ⚲
[2ddba703] Juniper v0.3.0 ⚲

I am still getting same error message

ccoffrin commented 4 years ago

According to this file, https://github.com/lanl-ansi/Alpine.jl/blob/master/Project.toml you might give Pavito.jl a try.

@Wikunia you might want to see if there is an easy way to use an old version of Juniper with Alpine.

Wikunia commented 4 years ago

@asavasci can you give an example of the part that is not working? I used release-0.3 of Juniper, Alpine v0.1.10, JuMP v0.18.6, Ipopt v0.6.1 and Cbc v0.6.6 and

# Here goes the building of your model...                                                                                                                          
setsolver(m, AlpineSolver(minlp_solver=JuniperSolver(IpoptSolver()), mip_solver=CbcSolver()))  
asavasci commented 4 years ago

After setting, setsolver(m, AlpineSolver(minlp_solver=JuniperSolver(IpoptSolver()), mip_solver=CbcSolver()))

Now, I am getting LoadError: type Variable has no field head in expression starting at solve(m) command

harshangrjn commented 4 years ago

@asavasci Can you share your exact problem you are solving (assuming the problem is a short one). I think I know the issue you are having.

asavasci commented 4 years ago

Here it is

test_alpine.txt

harshangrjn commented 4 years ago

@asavasci There were a few syntax and NLexpression issues which I fixed, after which the LoadError you had doesn't appear anymore. Also, global solvers typically perform better when you have variables initialized with finite bounds, rather than constraints. Here is the updated file: test_alpine_1.txt

However, Alpine has some issue with the lower bounding problem and isn't able to prove global optimality due to infeasibility (to do with numerics). But, Juniper is able to produce a feasible solution which is also global as it is easy to verify for your problem (and verified with another global solver). So, for now, feel free to run the attached file. Will keep you posted once the issue in Alpine is fixed.

asavasci commented 4 years ago

Noted. Thank you very much.

odow commented 1 year ago

This should be fixed now?

harshangrjn commented 1 year ago

Let me check on it and get back. It's been a while.

harshangrjn commented 1 year ago

Local solver isn't an issue in this anymore.