Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Min Max Optimization

  • 1.  Min Max Optimization

    Posted Thu February 19, 2015 07:31 AM

    Originally posted by: Abdelkader


    Hi everybody,

     

    Does someone know if Min Max Optimization possible with OPL CPLEX, example:

    Minimize Max_{j}{f_1,..,f_j,..,f_n}

     

    If yes how to implement ? Please provide me with a short code as a model. 

     

    Many thanks in advance and to Alex especially.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Min Max Optimization

    Posted Thu February 19, 2015 10:57 AM

    Hi

    range r=1..5;
    dvar int x[i in r] in r;

    minimize max(i in r) x[i];
    subject to
    {

    }

    could help ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Min Max Optimization

    Posted Thu February 19, 2015 11:43 AM

    Originally posted by: Abdelkader


    I'll test it anklet you know. Many Thanks to you Alex.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Min Max Optimization

    Posted Thu February 19, 2015 11:55 AM

    Originally posted by: Abdelkader


    A question: does it solve the min-max problem by returning the minimum of the maximum of a set of objectives, i.e., f*= minmax{f_i} ?
    Thanks in advance,

    Abdelkader
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Min Max Optimization

    Posted Fri February 20, 2015 03:08 AM

    Hi

    yes the optimization is done for the min of the max/

    range r=1..5;
    dvar int x[i in r] in r;

    minimize max(i in r) x[i];
    subject to
    {
     forall(i in r:i!=1) x[i]==2;
    }

    gives

    either 1 or 2 for x[1]

    whereas if you write

    range r=1..5;
    dvar int x[i in r] in r;

    //minimize max(i in r) x[i];
    subject to
    {
     forall(i in r:i!=1) x[i]==2;
    }

    int m=max(i in r) x[i];

    execute
    {
    writeln(m);
    }
     

    no optimization is done but m is computed.

     

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Min Max Optimization

    Posted Fri February 20, 2015 04:16 AM

    Originally posted by: Abdelkader


    Great dear Alex. I'll test it and will feed you back.

    Best,

    Abdelkader 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Min Max Optimization

    Posted Fri February 20, 2015 07:27 AM

    Originally posted by: Abdelkader


    Dear Alex,

    It seems working. However, i would like to know how to minimize the maximum of objectives as follows:

    minimize max(i in r) x[i][j], that should give something like min (j in s) x[i*][j] where i* is the index of the maximum objective among all the objectives indexed by i. Then we minimize with regards to this maximal objective x[i*][j], where j=1,..,s.

    But I face some struggles to implement it. Could you help please ?

    Best,

    Abdelkader


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: Min Max Optimization

    Posted Fri February 20, 2015 08:24 AM

    Hi,

    for your different objectives, you may use dexpr:

    range r=1..5;
    dvar int x[i in r] in r;

    dexpr int obj[j in r]=sum(i in r:i!=j) x[i];

    minimize max(j in r) obj[j];
    subject to
    {
     
    }

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 9.  Re: Min Max Optimization

    Posted Fri February 20, 2015 09:06 AM

    Originally posted by: Abdelkader


    Nice Alex,

    A question: where does variables x[i] are taking their values?

    What is the form of each objective function ? Is it f_j(x)=sum_{i}x[i]  for all i, for all x?

    Cheers

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 10.  Re: Min Max Optimization

    Posted Fri February 20, 2015 09:20 AM

    Hi,

    x are decision variables and I wrote

    dexpr int obj[j in r]=sum(i in r:i!=j) x[i];

    as an example for objectives.

    obj 1 is x2+x3+x4+x5 (sum for all i in r such as i different from 1)

    regards

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 11.  Re: Min Max Optimization

    Posted Fri February 20, 2015 09:51 AM

    Originally posted by: Abdelkader


    Wonderful! That's what I've understood.

    I'll let you know.

    Best


    #DecisionOptimization
    #OPLusingCPLEXOptimizer