I am trying to do constrained optimization using R. My constraint is not continuous. Here is an example:
minimize: f(x,y)=(x-2)^2+y^2
st. x=0 or x>=3
y=0 or y>=2
What type of optimization problem is this?
I am trying to do constrained optimization using R. My constraint is not continuous. Here is an example:
minimize: f(x,y)=(x-2)^2+y^2
st. x=0 or x>=3
y=0 or y>=2
What type of optimization problem is this?
These are called semi-continuous variables. Some solvers support these directly, but they can also be formulated with additional binary variables:
3*d <= x <= 1000*d
d binary
Anyway, you end up with a MIQP model (Mixed Integer Quadratic Programming). Solvers like Gurobi and Cplex support this and have R interfaces.