Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  feasopt command in Interactive Optimizer

    Posted 09/13/11 11:34 AM

    Originally posted by: CplexUser1453


    Hello

    I have a fairly stupid question regarding the use of feasopt command in the Interactive optimizer.

    Having called "feasopt constraints" on my problem and having obtained a solution I would like to know which of the constraints were modified. How can I do that?

    (my brain may not be working properly after a three day weekend, but it seems to me that the user manual is a little thin on the subject... : http://publib.boulder.ibm.com/infocenter/cosinfoc/v12r2/index.jsp?topic=%2Filog.odms.cplex.help%2FContent%2FOptimization%2FDocumentation%2FCPLEX%2F_pubskel%2FCPLEX1137.html)

    Having not used the feasopt feature before I have another more general question :
    I am dealing with a problem that is often infeasible (the input data is not very good). I know exactly which constraints may need to be modified. To find a minimal modification of my constraints, which of the following makes more sense?
    1. Calling feasopt
    2. Defining a set of deviation variables for constraints that may be violated due to bad data and minimizing them.

    Thx a lot
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: feasopt command in Interactive Optimizer

    Posted 09/13/11 12:36 PM

    Originally posted by: John Cui


    The easiest way is that, wrote your model by opl in CPLEX Studio, then CPLEX Studio will tell you the constraits need to be changed to make your model feasible. You can go to here to take a look:
    http://publib.boulder.ibm.com/infocenter/cosinfoc/v12r3/topic/ilog.odms.ide.help/Content/Optimization/Documentation/Optimization_Studio/_pubskel/ps_opl_IDE449.html

    In interactive, you can write out the *.clp file to get know which constraints caused infeasible.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: feasopt command in Interactive Optimizer

    Posted 09/13/11 01:03 PM

    Originally posted by: CplexUser1453


    I am familiar with the relaxation feature in OPL, it is really is nice. Unfortunately I am dealing with a model in *.lp format for now :(

    To be more exact I am actually interested in the equivalent of "Suggested Relaxation" message in the "Relaxations" output tab of OPL.
    I would like to know if there is a way to get it from the CPLEX interactive optimizer.

    When I write out the *.clp file ("write pb.clp"), I get the following error :

    CPLEX Error 1719: Conflict is not available.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: feasopt command in Interactive Optimizer

    Posted 09/13/11 06:23 PM

    Originally posted by: John Cui


    Sorry, forgot to tell you you should run conflict command first to generate minimize conflict set, then you can write it out to .clp file.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: feasopt command in Interactive Optimizer

    Posted 09/14/11 10:48 AM

    Originally posted by: SystemAdmin


    What might help is
    disp sol slack -
    

    This should print the slacks for all constraints. And if a constraint is violated then the line should get two stars appended.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: feasopt command in Interactive Optimizer

    Posted 04/18/12 06:07 AM

    Originally posted by: CplexUser1453


    Hello
    I have not managed to find the relaxations this way but it maybe due to the fact that I am dealing with to a particular case.

    Here is the problem I am dealing with : I have .mps file that is feasible and the same model saved as an .sav file that is infeasible (has been discussed on the forum - https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14687910&#14687910)

    I would like to use the interactive optimizer to find where the trouble is. A log where is attached where I launched the following commands :
    1. optimization with the .mps file
    2. feasopt with the .sav file w
    3. disp sol slack -

    I am not seing any stars :(

    Is it because :
    1) The numerical imprecision is due to lp instability and therefore I won't see it in slacks
    2) I am missing something?
    (CPLEX 12.2.0)

    Just to complement, the data in my problem do not seem great (output with SET MIP STRATEGY KAPPASTATS = 2):
    
    > display solution quality Incumbent solution: MILP objective                                 1.4139026292e+08 MILP solution norm |x| (Total, Max)            6.36115e+06  3.10000e+04 MILP solution error (Ax=b) (Total, Max)        5.72315e-10  8.07177e-12 MILP x bound error (Total, Max)                3.15481e-12  9.09495e-13 MILP x integrality error (Total, Max)          5.40012e-13  1.35003e-13 MILP slack bound error (Total, Max)            2.17945e-10  1.27045e-11   Branch-and-cut subproblem optimization: Max condition number:                    6.2914e+09 Percentage (number) of stable bases:      0.00%   (1) Percentage (number) of suspicious bases: 100.00%   (160698) Percentage (number) of unstable bases:    0.00%   (0) Percentage (number) of ill-posed bases:   0.00%   (0) Attention level:                         0.010000
    


    Thanks!
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: feasopt command in Interactive Optimizer

    Posted 04/18/12 06:08 AM

    Originally posted by: CplexUser1453


    Here is the log
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: feasopt command in Interactive Optimizer

    Posted 04/18/12 06:33 AM

    Originally posted by: SystemAdmin


    I looked at the log file that is attached to the next post.
    My guess is that you are suffering from numerical problems here. Feasopt finds a solution with
    Feasopt - Feasible relaxed sum of infeasibilities:  Relaxation = 0.0000000000e+000
    

    This says that the solution is deemed infeasible but the violation is actually 0 (or very close to that). If the violation would be exactly 0 then the solution would be considered feasible. So you are just at the borderline between feasibility and infeasibility.
    Have you tried setting numerical emphasis or tightening tolerances?

    By the way, from the post you referenced I see that you export the model as SAV and LP/MPS file. As you may know, exporting to text formats like LP or MPS may truncate floating point numbers and this may in turn influence feasibility of models, in particular in cases that are numerically borderline. What you could do is to import the MPS file and the SAV file and then compare the two models. That should tell you which numbers were truncated (although comparing two models is not that easy).
    And one other thing: You said you export the SAV file so that you store the basis and can warmstart a sub-sequent solve. You could also use IloCplex::getBasisStatuses() and IloCplex::setBasisStatuses() to install a starting basis and modify the model in memory. That would not solve the numerical issues but it would not require to write intermediate files.
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: feasopt command in Interactive Optimizer

    Posted 04/18/12 08:13 AM

    Originally posted by: CplexUser1453


    Thanks for your rapid answer - was not sure how to interpet the "Relaxations" value.

    Looked at your the "numeric difficulties" and "Coping with an ill-conditioned problem" articles in the CPLEX documentation so I will try what is suggested there.
    #CPLEXOptimizers
    #DecisionOptimization