Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  sensitivity analysis?

    Posted 11/04/08 02:06 AM

    Originally posted by: SystemAdmin


    [agus said:]

    Hi,
    I am trying to do a sensitivity analyisis with my model, I am able to do it with a small problem, but I can't implement it on a larger model.

    Here is the model where it works:


    dvar float x in 5..20;
    dvar float y in 0..20;

    maximize x+y;

    subject to
    {
      ct1:2*x+y<=10;<br />  ct2:x<=7;<br /> }

    execute
    {
      writeln( ct1.name," ",ct1.UB," ",ct1.LB," ",ct1.dual," ",ct1.slack);
      writeln( ct2.name," ",ct2.UB," ",ct2.LB," ",ct2.dual," ",ct2.slack);
      writeln(x.reducedCost);
      writeln(y.reducedCost);
    }


    but when I tried with this:


    dvar float+ t[Flights][nodes];

    A:
    forall (i, j in Flights: i.flightID!=j.flightID, u in (i.realNodes inter j.realNodes): u!= last(i.realNodes))
        (t[j][u] - t[i][u] >= (t[i][next(i.realNodes,u)]-t[i][u])/luv[u][next(i.realNodes,u)]*200 - (1-y[i][j][u])*1000000);


    execute
    {
      // Getting the slack for constraint A
      writeln( A.name," ",A.UB," ",A.LB," ",A.dual," ",A.slack);

      //Getting the reduced cost for variable t
      for (p in Flights, nodes)
          writeln(p.reducedCost);
    }


    I got this from the Scripting log window:
    // solution (optimal) with objective 4426.46699999603
    A undefined undefined undefined undefined
    undefined
    undefined
    undefined
    undefined
    undefined
    undefined

    I am guessing it is because of the sparsity.

    Can anyone help me with this

    Thanks

    agus


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: sensitivity analysis?

    Posted 11/04/08 05:46 AM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    Agus,

    You should use  writeln(p[f][n].reducedCost);

    See following example


    range Flights = 0..10;
    range nodes = 1..5;
    dvar float+ t[f in Flights][nodes] in f..1000;

    minimize sum(f in Flights, n in nodes) t[f][n];
    constraints {
      forall(f in Flights, n in nodes) t[f][n] >= 3;
    }

    execute
    {


      //Getting the reduced cost for variable t
      for (var f in Flights)
        for (var n in nodes)
          writeln(t[f][n].reducedCost);
    }


    Didier.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: sensitivity analysis?

    Posted 11/05/08 12:13 AM

    Originally posted by: SystemAdmin


    [agus said:]

    Hi Didier,

    Thanks a lot for your reply. But I noticed that it only works as long as you don’t have any [b]integer[/b] decision variable in the constraints. If you do have integer variables, then it will just give “null” value for the reduced cost value. Is there any way around it?

    Appreciate your help

    agus

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: sensitivity analysis?

    Posted 11/05/08 01:39 AM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,

    reduced cost and duasl values only exist for LP, not for MIP.
    So any integer variable in the model make them unavailable.

    Alain
    #DecisionOptimization
    #OPLusingCPLEXOptimizer