Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Difference in LP optimal solution between primal simplex and barrier optimizer

  • 1.  Difference in LP optimal solution between primal simplex and barrier optimizer

    Posted 12/18/16 11:01 AM

    Originally posted by: JimDan


    I use C Callable library to populate an LP. I figured out that this LP solves quicker using baropt rather than primopt. So, in my code, I first solve this using baropt. Then, since I need a basis for subsequent operations, perform a primal basis crossover. 

     

    Via code, this is:

     

    CPXsetintparam(env, CPXPARAM_Barrier_Crossover, 1);
    int ret = CPXbaropt(env, lp);//Solve using barrier and perform primal basis crossover.

     

    The problem is that there seems to be some discrepancy between the optimal LP value as queried after the above two lines via

     

    ret = CPXsolution (env, lpptr, &lpstat, &zval, xsol, pi,NULL,red_cost);

     

    The zval value after the above is 97153.47

     

    Immediately after the above line, I have

     

    int ret = CPXprimopt(env,lp);//solve via primal LP

    ret = CPXsolution (env, lpptr, &lpstat, &zval, xsol, pi,NULL,red_cost);

     

    However, the zval value here is 96846.

     

    When I save the .lp file and open up interactive optimizer (IO) and read the lp file and solve it using baropt, it gives me 96846.

     

    So, there seems to be some discrepancy between IO baropt (which seems to be giving the right answer) and baropt accessible via callable library.

     

    Thanks.

     

    ETA: I have observed this strange behavior both with CPLEX version 12.6.3 as well as 12.7 to which I have just upgraded.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Difference in LP optimal solution between primal simplex and barrier optimizer

    Posted 01/02/17 02:08 AM

    Originally posted by: BoJensen


    It sounds like your problem is numerically unstable. Could you please try to print out the kappa value of the final basis (display->solution->kappa), the solution quality (display->solution->quality) and problem statistics (display->problem->stats).


    #CPLEXOptimizers
    #DecisionOptimization