Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

how to maximize the model using multiperiod location problem?

  • 1.  how to maximize the model using multiperiod location problem?

    Posted 07/26/13 03:18 AM

    Originally posted by: taylor318


    Hello.

    I have been studying  OPL for about two weeks, but I am not sure how to formulate a code for multi-period location problem.

    I have formulated a code for the basic location problem, which works!  and by fixing some of the code, i have to make it as a multi-period (t = 1,2,3) problem.

    so the problem that I am having is that 

    when I use the data from the excel, my data's density should increase by 10 percent each year. (i am only doing for 3 periods)

    1)  First year's data = D 

         Second year's data = D*1.1

         Third year's data = D*1.2

     

    I tried to do it but I get the correct answer till the second year but in third year I get the value of D*1.32 which is D*1.1*1.2.

    range Time = 0..2;

    execute Density{
      for (var i in PatientData){
      for (var t in Time){
     
          Patient[i].x = Patient[i].x*(1.0+0.1*t);
          Patient[i].y = Patient[i].y*(1.0+0.1*t);
          
        }
     writeln(Patient[i]);  }
    }

     what should i change to fix it?

     

    2) for the objective and constraint function, i need to maximize the number of patients for each period using limited number of ambulance in that specific period. So for period 1= 2, period 2 =3, period 3 =1.

    What is the formulation of the iteration be like for this?

    Also, for the objective function, I need to maximize the number of patients for each period, which requires double summation for each period.

    how should i change from the code below?

     

     maximize

      sum (i in PatientNum) Y[i];
      
     
    subject to{
      forall(i in PatientNum){
        sum(j in AmbulanceNum)
          W[i][j]*X[j] >= Y[i];
      } 
      
      sum(j in AmbulanceNum)
        X[j] <= P;
    }

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: how to maximize the model using multiperiod location problem?

    Posted 07/31/13 01:15 PM

    Originally posted by: aravindnambiar


    You will need to add an indice to your X & Y.

    X[j][t] and Y[i][t] 

     

    Your objective function can be denoted as:

    maximize

    sum(i in PatienyNum, t in Time)Y[i][t];

    similarly for the constraints..


    #DecisionOptimization
    #OPLusingCPLEXOptimizer