Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Java Cplex 9.0 : Problem setting 2 limit parameters

  • 1.  Java Cplex 9.0 : Problem setting 2 limit parameters

    Posted Fri November 21, 2008 11:08 PM

    Originally posted by: SystemAdmin


    [waynec said:]

    Hi,

    I'm solving integer problems using Cplex 9.0 in a Java program. To respect some CPU budget, I set a maximum number of seconds to each Cplex solve(). But I also need to set a branch-and-bound tree size limit to avoid 'out-of-memory' errors.

    My code looks like (if I want a 500MB size limit and 3600 sec time limit) :

    cplex.setParam(DoubleParam.TreLim, 500);
    cplex.setParam(DoubleParam.TiLim, 3600);
    cplex.solve();


    What I find strange is that only the [b]last[/b] setParam() is active, [b]not both of them[/b].
    With my code example, only time limit is active; Cplex won't stop even if the tree size is over 500MB.

    And if I set [i]TiLim[/i] before [i]TreLim[/i], then only the size limit is active; Cplex won't stop even after the time limit.

    Is this a bug ? Can I set 2 limits in Cplex ?

    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Java Cplex 9.0 : Problem setting 2 limit parameters

    Posted Mon November 24, 2008 07:38 PM

    Originally posted by: SystemAdmin


    [oussedik said:]

    Hi,

    Try to use cplex.setParam(IloCplex.DoubleParam.TreLim,500) and cplex.setParam(IloCplex.DoubleParam.TiLim,3600).

    The TriLim limit is related to the memory size of the compressed tree, it is then possible that the uncompressed memory is above your limit but the compressed one is still below it.

    Sofiane
    #CPLEXOptimizers
    #DecisionOptimization