Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Relaxation information with feasopt in Matlab API

  • 1.  Relaxation information with feasopt in Matlab API

    Posted Sun July 23, 2017 10:13 AM

    Originally posted by: Marouenbg


    Hi everybody,

    I am trying to relax an infeasible model using the ILOG CPLEX Matlab API.

    I used cplex.feasOpt(lhs,rhs,lb,ub) to obtain a feasible solution.

    I am interested in the bounds/constraints that were relaxed and the magnitude of the relaxation.

    I couldn't find an option to get the information, although it seems that it is possible through other APIs.

    Thanks for the help,


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Relaxation information with feasopt in Matlab API

    Posted Mon July 24, 2017 02:23 AM

    If feasOpt() found a feasible solution then nothing was relaxed and all the information you want is zero.

    If feasOpt() found a solution that is feasible for the relaxed but not the original problem then this solution is the resident solution in the CPLEX object and can be queried with Cplex.solution.x. From this you can compute any relaxation information.

    In order to find violated constraints you can use Cplex.solution.ax and compare that to the right-hand sides.

    You can find which bounds were relaxed by comparing Cplex.solution.x to the lower and upper bound vectors.


    #CPLEXOptimizers
    #DecisionOptimization