Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Criteria for ending Barrier Optimization

    Posted Tue March 10, 2015 09:53 AM

    Originally posted by: FabianS


    Hey,

    I need a little help on finding out for what reason the Barrier Optimizer decides to finish the optimization. While running different optimization problems with the barrier optimizer, the optimization is finished at some stage of the iteration process. If everthing works as wanted, usually primal and dual objective are the same. But while testing it often happens that it quits before this criteria is fullfilled and solutionstatus only says "Solution is available, but not proven optimal". Is there a way to find out what criteria (like max. number of iterations or timelimit exceeded or else) is the reason for the abortion?

    I'm running cplex 12.4 with Maltab 2013a on a Windows 7 Machine.

    Thanks for your help.

    fabian


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Criteria for ending Barrier Optimization

    Posted Tue March 10, 2015 10:56 AM

    It may help to look at the numeric CPLEX status code and compare that against the list provided here.

    You can get the numeric CPLEX status as output.cplexstatus for toolbox functions (see for example here) or as the Cplex.Solution.status field of the Cplex class (see here).

    If barrier stops due to a time or iteration limit then the CPLEX status should reflect that (CPX_STAT_ABORT_TIME_LIM or CPX_STAT_ABORT_IT_LIM). I guess what you are seeing is CPX_STAT_NUM_BEST?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Criteria for ending Barrier Optimization

    Posted Tue March 10, 2015 11:48 AM

    Originally posted by: FabianS


    Hey Daniel,

    Thanks for your quick reply. I was aware of the solution status, but didn't know that there is one for the iteration limits or time. But is there a more detailed information about the possible reasons for the numeric difficulties? Refine conflict doesn't really work, because I don't actually have a conflict. I had a nicely working optimization, but after (accidentally?) changing some restrictions over night the barrier always finishs after 50 iterations (which is weird bedause I can change a lot of things but it always stopps at this point...). But it is still possible to solve the problem with a different solver like dual simplex. If I try to undo everything I can imagine, the problem still remains and I don't really have an idea to get closer to the original reason.

    Thanks for your help,

    fabian


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Criteria for ending Barrier Optimization

    Posted Tue March 10, 2015 12:13 PM

    One thing you could try blindly (without investigating where the trouble actually comes from) would be to enable CPX_PARAM_NUMERICALEMPHASIS. That asks CPLEX to be more careful with numerics.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Criteria for ending Barrier Optimization

    Posted Tue March 10, 2015 06:57 PM

    Originally posted by: EdKlotz


    Fabian,

                 Can you post a barrier iteration log with the barrier display parameter set to 2 to this thread?   Also, can you display the solution quality after the run stops?  And finally, if this is an LP or QP rather than a QCP or SOCP, please try running the simplex method (both primal and dual) on the model just to see what happens.   It may shed some light on what is happening.

                 For LPs, the barrier method uses a convergence criteria that is based on the following measure all residing within the barrier convergence tolerance (called eps below):

    • Normalized primal feasibility measure  || b - Ax || / ||b|| <= eps
    • Normalized dual feasibility measure     || c - A'y - s || / ||c|| <= eps
    • Normalized strong duality measure      || c'x - b'y|| / ||c'x|| <= eps

    If some particular aspect of your data is large relative to the rest of the model, that can cause trouble achieving convergence.   For example, if your model has huge right hand side values, the barrier algorithm may have trouble reducing the normalized primal feasibility measure below the convergence tolerance because round-off error in the calculation of the above quantities is significantly larger than the convergence tolerance.    Thus, the measure just fluctuates above the convergence tolerance as different levels of round-off error creep into the calculations, and eventually CPLEX stops after seeing no progress after a significant number of iterations.   In such cases, you either want to rescale the model to reduce the size of the large problem data values, or, if that is not possible, consider using a larger convergence tolerance that exceeds any potential round-off error associated with the data values.

     

    Ed


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Criteria for ending Barrier Optimization

    Posted Fri March 13, 2015 05:21 AM

    Originally posted by: FabianS


    Dear Ed, Daniel,

    Thank you very murch for your Input.

    I was actually running the model with the numerical emphasis activated. Actually I made some progress on one of my problems. By changing the starting point heuristic for the barrier from 3 to default (0) I was able to finish to solve the smaller problem in a similar time as before with good results. And several changes in boundary conditions and amount of equations led to stable calculation times and the expected results.

    But I still have problems with the larger problem. I did add the diary file to this post. but I'm not quite sure how I can read out the cplex pbject informations about the soultion quality and post it here. I can access them, but I'm not so sure about how to analyse them or how to extract them. This is a LP but due to its size it takes really long for the simplex to solve it. For the smaller problem I tried it before and it worked, but in 10x the time.... The problem is, that very small changes in the size of the problem (for simplification) or even small changes in the boundary conditions can make the problem solvable for the barrier, but as far as I can see these changes don't add variables in a specific (high or low) amplitude or something. In general the problem is not that well condtioned, but it worked surprisingly good for several (murch more complicated) problems in the past. I did also add a diary file for a similar calculation that did not show the problem.

    I'm working myself through different cplex - Parameters right now and I am checking if I can find any similarities between the problems that can be solved and those that can't, but probably you have an idea for a more structured way to adress the problem.

    Thank you very much.

    fabian


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Criteria for ending Barrier Optimization

    Posted Fri March 20, 2015 03:33 AM

    Besides enabling numerical emphasis, have you tried setting the other tolerance parameters to smaller values or their minimum? The parameters of interest are CPX_PARAM_EPRHS, CPX_PARAM_EPOPT, CPX_PARAM_EPCOMP.


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Criteria for ending Barrier Optimization

    Posted Tue March 24, 2015 06:53 AM

    Originally posted by: FabianS


    Hi Daniel,

    The barrier convergance tolerance is set to 10^-8. Setting a higher or lower value still lets him stop at iteration 50. As far as I understand the other two parameters refer only to simplex algorythm or do they still affect a barrier calculation? I really don't understand why cplex always(!) stopps at the 50th iteration, regardless what primal or dual objective, or any other paramters I am aware of are the same... Is there any algorithm that is performed on every "x" amout of iterations? Starting the smaller example, wich also finished at iteration 50, with a newer cplex version (12.6.1) actually continued exactly till iteration 100 and stopped afterwards...

    Thanks for your help,

    fabian


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: Criteria for ending Barrier Optimization

    Posted Mon May 18, 2015 01:30 AM

    Sorry for the very long delay. I think I just bumped into something that may explain what you are seeing. Are you still struggling with this? If so, would you be willing to export your model as a SAV file and either attach it here or send it directly to daniel(dot)junglas(at)de(dot)ibm(dot)com?


    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: Criteria for ending Barrier Optimization

    Posted Thu April 07, 2016 10:54 PM

    Originally posted by: Mehdi.M


    Hi

    My large scale model is working well when I use the default Barrier convergence tolerance parameter. However, when I try 1e-7 to solve faster the model become unbounded while the objective function is convex and the goal is minimizing with lower bound 0.

    What is  you opinion?

    Thanks in advance

    Mehdi

     

     


    #CPLEXOptimizers
    #DecisionOptimization