Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Yield management results

    Posted Thu August 25, 2016 10:48 AM

    Originally posted by: sandeepsinghchauhan


    Hello

    I found there is some major problem with solution obtained by yield management.

    Problem has reference from Model Building in Mathematical Programming by HP Williams. In same book solutions also described in part IV (i am attaching photo of solution from same book) In which the totsl objective obtain is different which getting from cplex.

     

    Please clarify this problem because solution given in book is different which we are getting from ILOG OPL CPLEX given code.

     

    please help


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Yield management results

    Posted Mon August 29, 2016 11:54 AM

    Hi,

    let me help you.

    The solutions look the same, only the objectives are different:

    If you add the following just before the subject to block

    dexpr int Price1[c in classes]=sum(o in options)
     PriceLevel1[c][o]*priceOptions[1][c][o];
     
     dexpr int Price2[c in classes][s in scenarios]=sum(o in options)
     PriceLevel2[s][c][o]*priceOptions[2][c][o];
     
     dexpr int Price3[c in classes][s1 in scenarios][s2 in scenarios]=sum(o in options)
     PriceLevel3[s1][s2][c][o]*priceOptions[3][c][o];

    and

    execute
    {
    writeln(Price1);
    writeln(Price2);
    writeln(Price3);
    }      

    in the postprocess then you get

    [1200 900 500]
     [[1150 1150 1300]
             [1100 1100 1100]
             [700 700 700]]
     [[[1500 1500 1500]
                 [1500 1500 1500]
                 [1500 1500 1500]]
             [[800 800 800]
                 [800 800 800]
                 [800 800 800]]
             [[480 480 450]
                 [480 480 450]
                 [480 480 450]]]

    which is the same as in the book.

    Regards

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Yield management results

    Posted Tue August 30, 2016 02:15 AM

    Originally posted by: sandeepsinghchauhan


    Thanks alex at least you shown some interest on my problem otherwise i am loosing my hope to get any solution.

    I have run the same model as given in cplex 12.6.3  but i am getting different values.

     

    I am surprised that when i run my model on i-5 2400cpu system i am getting different answer. then i run on i-7 4970 cpu machine i got same answer which you have mentioned.

    Is it all about processors?

    thanks

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Yield management results

    Posted Tue August 30, 2016 03:46 AM

    Hi,

    what do you get instead of

    [1200 900 500]
     [[1150 1150 1300]
             [1100 1100 1100]
             [700 700 700]]
     [[[1500 1500 1500]
                 [1500 1500 1500]
                 [1500 1500 1500]]
             [[800 800 800]
                 [800 800 800]
                 [800 800 800]]
             [[480 480 450]
                 [480 480 450]
                 [480 480 450]]]

    ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Yield management results

    Posted Tue August 30, 2016 04:39 AM

    Originally posted by: sandeepsinghchauhan


    I am getting

    [1200 900 500]
     [[1150 1150 1300]
             [1100 1100 1100]
             [700 700 700]]
     [[[1500 1500 1500]
                 [1500 1500 1500]
                 [1500 1500 1500]]
             [[800 800 800]
                 [800 800 800]
                 [800 800 800]]
             [[470 480 450]
                 [480 480 450]
                 [480 480 450]]]

    solutions, and total objective as  168917.2


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Yield management results

    Posted Tue August 30, 2016 05:12 AM

    Hi,

    the solution I get is slightly better.

    If you set a smaller epgap you will get the better solution. https://www.ibm.com/support/knowledgecenter/SS9UKU_12.5.0/com.ibm.cplex.zos.help/Parameters/topics/EpGap.html

    regards

    PS:

    I hope you can go on with your research now

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Yield management results

    Posted Tue August 30, 2016 05:22 AM

    Originally posted by: sandeepsinghchauhan


    Thanks a lot :)

    I am getting same results as you are getting.

    Is there any way to get same objective value as given in book :)

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: Yield management results

    Posted Fri September 09, 2016 03:24 AM

    Originally posted by: sandeepsinghchauhan


    Hello alex, when i put demand as given in book as

    demand =
    [[[[10,15,20],
       [20,25,35],
       [45,55,60]],
      [[20,25,35],
       [40,42,45],
       [50,52,63]],
      [[45,50,60],
       [45,46,47],
       [55,56,64]]
     ]
     [
      [[20, 25, 35],
       [42,45,46],
       [50,52,60]]
      [[10,40,50],
       [50,60,80],
       [60,65,90]]
      [[50,55,80],
       [20,30,50],
       [10,40,60]]
     ]
     [
      [[30,35,40],
       [40,50,55],
       [50,60,80]],
      [[30,40,60],
       [10,40,45],
       [50,60,70]],
      [[50,70,80],
       [40,45,60],
       [60,65,70]]
     ]
    ];

    then i am getting following solutions:

    // solution (optimal) with objective 168922.24
     [1200 900 500]
     [[1150 1150 1300]
             [1100 1100 1100]
             [700 700 700]]
     [[[1500 1500 1500]
                 [1500 1500 1500]
                 [1500 1500 1500]]
             [[800 800 800]
                 [800 800 800]
                 [800 800 800]]
             [[480 480 450]
                 [480 480 450]
                 [480 480 450]]]

    Which is same as given in book

    ---------------------------------------------------------------

    For second period i updated demand as:

    solution (optimal) with objective 173550
     [1200 900 500]
     [[1150 1150 1150]
             [1100 1100 1100]
             [700 700 700]]
     [[[1500 1500 1500]
                 [1500 1500 1500]
                 [1500 1500 1500]]
             [[800 800 800]
                 [800 800 800]
                 [800 800 800]]
             [[480 480 450]
                 [480 480 450]
                 [480 480 450]]]


    Getting same solutions as given in book:

    solution (optimal) with objective 173550
     [1200 900 500]
     [[1150 1150 1150]
             [1100 1100 1100]
             [700 700 700]]
     [[[1500 1500 1500]
                 [1500 1500 1500]
                 [1500 1500 1500]]
             [[800 800 800]
                 [800 800 800]
                 [800 800 800]]
             [[480 480 450]
                 [480 480 450]
                 [480 480 450]]]

    ------------------------------------------------------------------------

     for 3rd period as demand value becomes:

    demand =
    [[[[25,30,40],
       [50,40,45],
       [50,53,65]],
      [[25,30,40],
       [50,40,45],
       [50,53,65]],
      [[25,30,40],
       [50,40,45],
       [50,53,65]]
     ]
     [
      [[22, 45, 50],
       [45,55,75],
       [50,60,80]]
      [[22, 45, 50],
       [45,55,75],
       [50,60,80]]
     [[22, 45, 50],
       [45,55,75],
       [50,60,80]]
     ]
     [
      [[30,35,40],
       [40,50,55],
       [50,60,80]],
      [[30,40,60],
       [10,40,45],
       [50,60,70]],
      [[50,70,80],
       [40,45,60],
       [60,65,70]]
     ]
    ];

    Still giving me same solution as given in book:

    [950 900 500]
     [[1300 1300 1300]
             [1100 1100 1100]
             [700 700 700]]
     [[[1500 1500 1500]
                 [1500 1500 1500]
                 [1500 1500 1500]]
             [[800 800 800]
                 [800 800 800]
                 [800 800 800]]
             [[480 480 480]
                 [480 480 480]
                 [480 480 480]]]

    ---------------------------------------------------

    update 3rd period (take-off)

    demand =
    [[[[25,30,40],
       [50,40,45],
       [50,53,65]],
      [[25,30,40],
       [50,40,45],
       [50,53,65]],
      [[25,30,40],
       [50,40,45],
       [50,53,65]]
     ]
     [
      [[22, 45, 50],
       [45,55,75],
       [50,60,80]]
      [[22, 45, 50],
       [45,55,75],
       [50,60,80]]
     [[22, 45, 50],
       [45,55,75],
       [50,60,80]]
     ]
     [
      [[45,60,75],
       [20,40,50],
       [55,60,75]],
     [[45,60,75],
       [20,40,50],
       [55,60,75]],
      [[45,60,75],
       [20,40,50],
       [55,60,75]]
     ]
    ];

    I am not getting same solutions as given in book

    solution (optimal) with objective 193460
     [1200 900 500]
     [[1300 1300 1300]
             [1100 1100 1100]
             [700 700 700]]
     [[[1500 1500 1500]
                 [1500 1500 1500]
                 [1500 1500 1500]]
             [[820 820 820]
                 [820 820 820]
                 [820 820 820]]
             [[480 480 480]
                 [480 480 480]
                 [480 480 480]]]

    Book has the different solution, i am attaching the snap of solution which given in book

    please help


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 9.  Re: Yield management results

    Posted Tue August 30, 2016 04:38 AM

    Originally posted by: sandeepsinghchauhan


    Why objectives are different from book ? What should i conclude about objectives?

     

    please help


    #DecisionOptimization
    #OPLusingCPLEXOptimizer