Decision Optimization

Decision Optimization

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

 View Only
  • 1.  MILP Program

    Posted Mon April 07, 2014 07:46 AM

    Originally posted by: vjkgp


    Hello,

    I am writing a MILP program in opl, question is as how to define a decision variable with array filteration i.e.

    {string} box={1,2,3,4};

    dvar boolean A[i in box, k in box];

    it is giving all the variables A[1,2], A[1,3], A[1,4], A[2,1], A[2,2], A[2,3], A[2,4], A[3,1], A[3,2], A[3,3]  A[3,4], A[4,1], A[4,2], A[4,3], A[4,4].

    So above underline variable is not required, i want  the following variable A[1,2], A[1,3] ,A[1,4] ,A[2,3] ,A[2,4] ,A[3,4]. please tell me which commend i should write to get the desire set. want that in A[ i in box, k in box] such that i should always be less than k(i<k). please help me 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: MILP Program

    Posted Mon April 07, 2014 09:10 AM

    Hi,

    you could try

    {int} box={1,2,3,4};

     

    tuple boxPair

    {

    int a;

    int b;

    }

     

    {boxPair} bp={ <i,j> | ordered i,j in box};

     

     

    dvar boolean A[bp];

     

    subject to

    {

    A[<1,2>]==0;

    }

    regards 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: MILP Program

    Posted Tue April 08, 2014 09:09 AM

    Originally posted by: vjkgp


    Hi Alex,

    Thanks for your help, actually i made a opl program for my problem, please see the attached file, when i  run the program it will give me zero values of all the decision variable,which is not correct there should be some values which i am getting in Lingo when solve the same problem, result which you can see in attached file, Now i am solving it in Cplex because lingo will not be able to handle big problem.

    please go through the file and provide me some solution as its very important because i have to submit my project before deadline.

     

    Thanks & Regards

    Vijendra Faria


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: MILP Program

    Posted Tue April 08, 2014 12:07 PM

    Hi,

    there are many solutions with the same objective. With both engines, you get the same objective so this looks normal.

    Regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: MILP Program

    Posted Tue April 08, 2014 12:57 PM

    Originally posted by: vjkgp


    Hi,

    Alex but what will i do without having decision variable values, you know that in model it is very important, and for me it is only required, please check its once more and find the issue, n tell me how to eliminate that warning coming after running the program, help me

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer