Hello people, all rigth?
I need to solve a nonlinear integer nonconvex problem. The objective and constraints are nonlinear functions.
First question:
- What the ideal package and solve to solve this problem?
- Is there any code-example for share with me?
- I found in the net the solver Juniper, able to solve these problems. The article describing this package is in:
https://arxiv.org/pdf/1804.07332.pdf
But, when I run this lines
using JuMP, Ipopt, Cbc, Juniper
ipopt = IpoptSolver(print_level=0);
cbc = CbcSolver()
m = Model(solver=JuniperSolver(ipopt, mip_solver=cbc))
v = [10,20,12,23,42];
w = [12,45,12,22,21]
@variable(m, 0 <= x[1:5] <= 10, Int)
@objective(m, Max, dot(v,x))
@constraint(m, sum(x[i] for i=1:5) <= 6)
@NLconstraint(m, sum(w[i]*x[i] for i=1:5) <= 300)
status = solve(m);
getvalue(x)
I have a mistake: “UndefVarError: base not defined”. This solver is very nice for my problem, but I would like to underestand this mistake.
Anyone could help me?