Decision Optimization

Decision Optimization

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

 View Only
  • 1.  MCLP Implementation in OPL

    Posted Mon November 28, 2022 11:23 AM
    Hello together,
    I just made my first steps in OPL a few days ago and try to solve a MCLP problem. I tried different approaches and looked up the documentation but I still cannot find a proper way to implement the Ni formula and especially to formulate the first constraint where j runs over the Ni set as seen below in the picture.

    Ni describes if the distance between points i and j are below the service radius S.  
    I'm thankful for every hint.

    Regards,
    Sebastian 
    enter image description here





    ------------------------------
    Sebastian Nink
    ------------------------------

    #DecisionOptimization


  • 2.  RE: MCLP Implementation in OPL

    Posted Tue November 29, 2022 08:19 AM
    Small example:

    range I=1..4;
    range J=1..3;
    
    int P=1;
    int a[I]=[100,100,60,100];
    float S=2;
    
    tuple position
    {
      float x;
      float y;
    }
    
    position Ipos[I]=[<1,1>,<-1,1>,<1,-1>,<-1,-1>];
    position Jpos[J]=[<1,0.5>,<1,-0.5>,<-1,0>];
    
    float d[i in I][j in J]=sqrt((Ipos[i].x-Jpos[j].x)^2+(Ipos[i].y-Jpos[j].y)^2);
    
    {int} N[i in I]={j | j in J:d[i][j]<=S};
    
    dvar float z;
    dvar boolean x[J];
    dvar boolean y[I];
    
    maximize z;
    
    subject to
    {
      z==sum(i in I)y[i]*a[i];
      
      forall(i in I) sum(j in N[i]) x[j]>=y[i];
      
      sum(j in J) x[j]==P;
    }​


    ------------------------------
    [Alex] [Fleischer]
    [Data and AI Technical Sales]
    [IBM]
    ------------------------------