Alpine.jl icon indicating copy to clipboard operation
Alpine.jl copied to clipboard

Local MINLP solver

Open asavasci opened this issue 5 years ago • 9 comments

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?

asavasci avatar Dec 02 '19 05:12 asavasci

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.

ccoffrin avatar Dec 02 '19 06:12 ccoffrin

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

I am still getting same error message

asavasci avatar Dec 02 '19 13:12 asavasci

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.

ccoffrin avatar Dec 02 '19 15:12 ccoffrin

@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()))  

Wikunia avatar Dec 02 '19 20:12 Wikunia

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

asavasci avatar Dec 03 '19 01:12 asavasci

@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.

harshangrjn avatar Dec 03 '19 01:12 harshangrjn

Here it is

test_alpine.txt

asavasci avatar Dec 03 '19 02:12 asavasci

@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.

harshangrjn avatar Dec 03 '19 22:12 harshangrjn

Noted. Thank you very much.

asavasci avatar Dec 04 '19 21:12 asavasci

This should be fixed now?

odow avatar Feb 15 '23 20:02 odow

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

harshangrjn avatar Feb 15 '23 20:02 harshangrjn

Local solver isn't an issue in this anymore.

harshangrjn avatar Feb 16 '23 23:02 harshangrjn