Decision Optimization

Decision Optimization

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

 View Only

tiny example of chance constraint in OPL - robust optimization

  • 1.  tiny example of chance constraint in OPL - robust optimization

    Posted Wed May 02, 2018 04:11 AM

    Very simple examples help many people so let me try to show how

    http://people.brunel.ac.uk/~mastjjb/jeb/or/sp.html

    is simple in OPL

    Let us start without alpha which means the probability should be 1, no uncertainty

    dvar float+ x;
    dvar float+ y;

    minimize 5*x+6*y;
    subject to
    {
        forall(a1,a2 in 1..6) a1*x + a2*y >= 3;
    }   

    we get

    x = 3;
    y = 0;

    Now with alpha=0.05 we write

    float alpha=0.05;

    dvar float+ x;
    dvar float+ y;

    minimize 5*x+6*y;
    subject to
    {
        1/36*sum(a1,a2 in 1..6) (a1*x + a2*y >= 3)>=1-alpha;
    }   

    and get

    x = 1;
    y = 1;

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer