Hello,
I am trying to create a model in which objective variable is linear, but the constraint involve calculation of euclidean distance between 2 points, these 2 points are in the following form:
(i) Both are decision variables (cx[i],cy[i]) and (cx[j],cy[j])
(ii) One point is known, say (px[i], py[i]) and other point is a decision variable: (cx[j],cy[j])
PROBLEM FORMULATION (Only some portion):
OBJECTIVE: minimize sum(j in circles) z[j];
DECISION VARIABLES:
dvar boolean g[points][circles];
dvar boolean z[circles];
dvar float+ cx[circles] in xmin..xmax;
dvar float+ cy[circles] in ymin..ymax;
dvar float r[circles] in rmin..rmax;
ONE OF THE CONSTRAINT:
forall (i,j in circles : i<j) {
overlap:
sqrt((cx[i]-cx[j])^2 + (cy[i]-cy[j])^2) - (r[i] + r[j]) >=0;
}
On running the code, i got the following error:
CPLEX(default) cannot extract expression: ((cx[i]+cx[j]*(-1))^2+(cy[i]+cy[j]*(-1))^2)^0.5
My query is:
(i) What is the correct way of writing the above expression ?
(ii) If CPLEX solver is able to solve such problem involving: Mixed integer non-linear programming, with linear objective function and non-linearity arising only due to inclusion of euclidean distance ?
(iii) If not, which software/programming language/solver I can use to solve this problem ?
#DecisionOptimization#Support#SupportMigration