Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Cplex and MATLAB for MILP : Empty solution, exit flag -2, 'integer infeasible'

    Posted 11/13/13 08:47 AM

    Originally posted by: Ben-1111


    Hi,

    I built a very large mixed integer linear problem in MATLAB, for minimization, where I repete N times the same constraints plus some constraints; It's a production problem. In my problem I modelized the stock of a machine by  X+ if it's an inventory X- if it's a backlog. If  one of them has a value, the other one is 0. To express this condition for this variable and other one in the same case i used the "Big M" method. I traduced all this constraints in Aineq and bineq. I used Binary variable in the "Big M" equation and a large number M to convert some variable to 0.

    When I try to solve the problem with this constraints I obtain an empty vector at the end with the exitflag = -2;

    The outputs are :

              cplexstatus: 103
        cplexstatusstring: 'integer infeasible'
               iterations: 0
                algorithm: 12
                     time: 0.0160
                  message: 'No feasible point was found.'

    and the options give this message : Row 'c1012' infeasible, all entries at implied bounds.

    I attached my program, if someone knows what happened, I'm agree to say the problem is in the code but may be I did something wrong between MATLAB and Cplex , because whithout Aineq and bineq the program is working but I don't obtain the exact good result and the simulation time is long.

    Thanks in advance for your answers.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Cplex and MATLAB for MILP : Empty solution, exit flag -2, 'integer infeasible'

    Posted 11/24/13 05:38 AM

    The message says that your problem is infeasible. That is, it contains constraints that contradict each other or cannot be satisfied.

    CPLEX provides the conflict refiner to analyze this sort of problems. In matlab this available if you use the class API instead of toolbox functions. In the class API there is function Cplex.refineConflict() which refines a conflict.

    If you want to stick with the toolbox functions then you can export your model to a SAV file, load that SAV file into the interactive optimizer and analyze the conflict there.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Cplex and MATLAB for MILP : Empty solution, exit flag -2, 'integer infeasible'

    Posted 11/25/13 10:24 AM

    Originally posted by: Ben-1111


    Thanks for your answer,

    I'm new with Matlab and cplex solver. I understand now, one of the constraints in the Big-M equations makes the problem infeasible and interfer with one of the equalities.

    But I never used the class API, only the toolbox and with the interactive optimizer of Cplex i need to read the SAV file before and I don't know how to export the data from matlab in this kinf of file,

    I put in the option of the code :

    options = cplexoptimset('cplex');
    options.exportmodel = 'milp.sav'
    options.Diagnostics = 'on';

    But I don't know where is the file "milp.sav'

     

    Can you help me, please?

    Thanks in advance


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Cplex and MATLAB for MILP : Empty solution, exit flag -2, 'integer infeasible'

    Posted 11/25/13 11:00 AM

    Look at the reference documentation of the cplexoptimset() function. Towards the end of that page you will find this:

    opt.exportmodel = 
    'myModel.lp';
    

    In order to export to a .sav file instead write

    opt.exportmodel = 
    'myModel.sav';
    

    With this parameter set, a call to any of the solve functions will create the desired file in the directory in which matlab is run.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Cplex and MATLAB for MILP : Empty solution, exit flag -2, 'integer infeasible'

    Posted 03/26/14 04:36 PM

    Originally posted by: patelzs


    Hey Ben,

    Did you figure out what the problem was in the end? I am trying to solve a Unit Commitment model and having a similar problem.

    Regards


    #CPLEXOptimizers
    #DecisionOptimization