Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Sensitivity Analysis for MIP

    Posted 02/19/13 09:56 AM

    Originally posted by: SystemAdmin


    Hi there,

    I am trying to get the reduced costs and shaddow prices for an MIP problem I am solving. I understand that I would not be able to use the regular routines for LP due to the lack of factorization for MIP.
    I also understand that there is a way to fix the MIP solution after solving it and using the SolveFixed, solving it as an LP and getting the reuired values. What I do not know is how to use the solvefixed routine through OPL Scripting. Is there a way?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Sensitivity Analysis for MIP

    Posted 02/20/13 07:50 AM
    Hi,

    let me show you an example of what I would try:

    Relax the integer constraints, solve, freeze the integer variables and then solve again.

    dvar int+ Gas;
    dvar float+ Chloride;
     
     
    maximize
      40 * Gas + 50 * Chloride;
    subject to {
      ctMaxTotal:     
        Gas + Chloride <= 50;
      ctMaxTotal2:    
        3 * Gas + 4 * Chloride <= 180;
        ctMaxTotal3:    
        3 * Gas + 2 * Chloride <= 150;
      ctMaxChloride:  
        Chloride <= 40;
    }
     
    main
    {
      thisOplModel.generate();
      cplex.solve();
      var x=thisOplModel.Gas.solutionValue;
      
      
       thisOplModel.convertAllIntVars();
       thisOplModel.Gas.UB=x;
       thisOplModel.Gas.LB=x;
       
       cplex.solve();
       
       writeln(thisOplModel.ctMaxTotal.dual);
    }
    


    regards
    #DecisionOptimization
    #OPLusingCPLEXOptimizer