How to use NLopt with juniper and Alpine

Hi,
Can we use NLopt with juniper/Alpine or any other solver for solving MINLP?
Thanks,
Manoj

Yes in theory but my experience has been that an error is thrown sometimes when a node is infeasible in Juniper so it may need a try-catch somewhere.

Why NLopt instead of Ipopt?

Ipopt is not generating a feasible solution after 3600 second with Juniper and alpine.

How expensive are your functions? Are you using second order Ipopt or first order?

I am defining model as
```
optimizer = Juniper.Optimizer
nl_solver = optimizer_with_attributes(NLopt.Optimizer, “algorithm” => 1)

mip_solver = optimizer_with_attributes(Gurobi.Optimizer)
model = Model(optimizer_with_attributes(optimizer, “nl_solver”=>nl_solver, “mip_solver”=>mip_solver ,“mip_gap”=>25))```

but getting error as
ERROR: LoadError: UndefVarError: NLopt not defined
Stacktrace:
[1] maincalc() at D:\Received_doc\From_dhana\Dev julia projectdeflection\Bulk_Sequencer_latest_05_08_2021.jl:1524
[2] top-level scope at D:\Received_doc\From_dhana\Dev julia projectdeflection\Bulk_Sequencer_latest_05_08_2021.jl:1637
[3] top-level scope at util.jl:156
in expression starting at D:\Received_doc\From_dhana\Dev julia projectdeflection\Bulk_Sequencer_latest_05_08_2021.jl:1636

You may also want to experiment with the traversing strategy Options · Juniper.

I am new to the field.
my constraints are the order of 5. how to use ipot with second order and first?

You have to set the hessian_approximation option to "exact" for second order or "limited-memory" for first order. Are you sure your problem isn’t just infeasible?

This error means that you are missing a line using NLopt

1 Like