Hello!
I want to run the following code:
function bivariate(solver, type)
try
#choose which solver you want to use
m = Model(solver.Optimizer)
#function we want to Optimize
f(x1,x2) = -x1 -x2
#Variables in the optimization model
@variable(m, x1)
@variable(m, x2)
#use piecewiselinear to solve the probem and set method to the type of formulation you want to test
#Logarithmic or MC
z = piecewiselinear(m,
x1,
x2,
#start: step: stop
0: 0.5: 1,
0: 0.5: 1,
(x1, x2) -> (-x1 - x2);
method = type,
)
#constraints of the model
@constraint(m, (x1)^2 + (x2)^2 <= 1)
@constraint(m, 0 <= x1 <= 2)
@constraint(m, 0 <= x2 <= 2)
#objective of the model
@objective(m, Min, z)
#optimize the model
optimize!(m)
value_x1 = value.(x1)
value_x2 = value.(x2)
return true, value_x1, value_x2
catch exeption
println(exeption.msg)
value_x1 = "-"
value_x2 = "-"
return exeption.msg, value_x1, value_x2
end
end
Whenever I select EAGO as solver, I get the following warning:
┌ Warning: At least one branching variable is unbounded. This will interfere with EAGO's global
│ optimization routine and may cause unexpected results. Bounds have been automatically
│ generated at +/- 1e10 for all unbounded variables, but tighter user-defined bounds are
│ highly recommended. To disable this warning and the automatic generation of bounds, use
│ the option `unbounded_check = false`.
└ @ EAGO C:\Users\kikiv\.julia\packages\E
However, I cannot find where there would be unbounded variables. Does pieceweiselinear introduce these?
Kind regards,
Kiki