Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Linear objective and Euclidean distance in constraint

  • 1.  Linear objective and Euclidean distance in constraint

    Posted Wed March 31, 2021 08:52 AM

    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


  • 2.  RE: Linear objective and Euclidean distance in constraint

    Posted Fri April 02, 2021 06:50 PM

    If you need further discussion, please open a case if you are entitled. Otherwise, please discuss your question in Data Science Community https://community.ibm.com/community/user/datascience/communities/community-home/digestviewer?communitykey=ab7de0fd-6f43-47a9-8261-33578a231bb7&tab=digestviewer






    #DecisionOptimization
    #Support
    #SupportMigration