Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CPLEX Error 1121

    Posted Tue May 27, 2014 05:42 AM

    Originally posted by: martin#r


    Hi,

     

    I  tested my model with various instances. Most of them work fine, but for a single instance I get:

    CPLEX Error  1121: Can't crush solution form.

    I already checked for possible solutions but the only suggestions I found were to disable dual and non-linear reduction, but CPLEX disables them automatically due to presence of my LazyConstraintCallback.

     

    I only changed a few settings which are:

    // only use a single thread
    cplex->setParam( IloCplex::Threads, 1);
    // traditional search
    cplex->setParam( IloCplex::MIPSearch, CPX_MIPSEARCH_TRADITIONAL);
    
    //use dual simplex
    cplex->setParam( IloCplex::RootAlg, CPX_ALG_DUAL);
    cplex->setParam( IloCplex::NodeAlg, CPX_ALG_DUAL);
    

    and I disabled CPLEX cuts by:

    cplex->setParam( IloCplex::FlowCovers, -1);
    cplex->setParam( IloCplex::FlowPaths, -1);
    cplex->setParam( IloCplex::MIRCuts, -1);     //disable mixed integer rounding cuts
    cplex->setParam( IloCplex::FracCuts, -1);    //disable Gomory fractional cuts
    cplex->setParam( IloCplex::ImplBd, -1);              //disable implied bound cuts
    cplex->setParam( IloCplex::LiftProjCuts, -1);        //only relevant for cplex 12.6
    cplex->setParam( IloCplex::EachCutLim, 0);
    cplex->setParam( IloCplex::CutPass, 0);
    cplex->setParam( IloCplex::FracPass, 0);
    

    Furthermore, I use a lazy- and a user-callback.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX Error 1121

    Posted Tue May 27, 2014 05:45 AM

    Originally posted by: T_O


    Does ist work, when you disable the complete presolver?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX Error 1121

    Posted Tue May 27, 2014 05:52 AM

    Originally posted by: martin#r


    Good point. I wanted to mention that but then forgot about it. When I set:

    cplex->setParam( IloCplex::PreInd, false);
    cplex->setParam( IloCplex::RelaxPreInd, 0);
    cplex->setParam( IloCplex::RepeatPresolve, 0);
    cplex->setParam( IloCplex::PreslvNd, -1);
    cplex->setParam( IloCplex::Probe, -1);
    cplex->setParam( IloCplex::ProbeTime, 1e+75);
    

    everything works fine. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX Error 1121

    Posted Tue May 27, 2014 07:05 AM

    Disabling presolve completely should help but is probably not what you like since it may hurt performance. Do you get this error when you try to add a cut or a lazy constraint? When you only get it when trying to add a cut then it might be an option to just ignore that single cut. This will not affect correctness but may affect performance. If you get this when adding a lazy constraint then ignoring the constraint is of course not an option.

    Could you post your model and the offending cut/constraint here? We could then try to figure out which presolve reduction you need to disable in order to allow CPLEX to crush this particular cut/constraint.

    Also, what version of CPLEX are you using?


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPLEX Error 1121

    Posted Wed May 28, 2014 04:50 AM

    Originally posted by: martin#r


    I am using CPLEX 12.6.
     
    I attached a .zip with the model (model.lp) and the ouput of the run until the exception occurs. All cuts are added by the lazy callback. I print the constraints starting with 'X : ' and X=1 is the lazy callback. I add multiple constraints per iteration and the constraints in the file are all added in the first call to the lazy callback.
     
    Unfortunately the file upload is not working. I uploaded the file via dropbox: https://www.dropbox.com/s/gfei3fx9qqwqlrw/model.zip.

    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: CPLEX Error 1121

    Posted Tue June 03, 2014 03:00 AM

    Thank you for the files. I downloaded them and managed to reproduce the problem here.

    Unfortunately, at the moment this looks like a real bug in CPLEX, the only robust way to work around this I see at the moment is to disable full presolve :-(

    Are the constraints for which you get the exception always of the same type? If they are, would it be an option to add them beforehand via IloCplex::addLazyConstraints() and see if that fixes the problem?


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: CPLEX Error 1121

    Posted Tue June 03, 2014 04:40 AM

    Originally posted by: martin#r


    I am testing with a lot of instances but I get this exception only for a single instance. I am not shure what you mean with 'same type' but the constraints I add with the callback are instance-specific and might cause trouble for different instances.


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: CPLEX Error 1121

    Posted Tue August 05, 2014 02:59 AM

    What I meant that maybe you are separating different "classes" of constraints. Like

     class A: sum (i in I) x[i] <= a

     class B: sum (j in J) y[j] <= b

    If you get the error only for class A constraints then you could add those constraints directly to CPLEX before starting the solve and separate only the constraints of class B.


    #CPLEXOptimizers
    #DecisionOptimization