Decision Optimization

Decision Optimization

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

 View Only
  • 1.  cp time limit

    Posted Tue March 06, 2018 06:15 AM

    Originally posted by: DavidGravot


     ! ----------------------------------------------------------------------------
     ! Problem could not be loaded within the time limit
     ! TimeLimit            = 600
     ! ----------------------------------------------------------------------------
     ! Total memory usage     : 15.0 GB (1.6 GB CP Optimizer + 13.3 GB Concert)
     ! Time spent in solve    : 1253.14s (0.03s engine + 1253.11s extraction)
     ! ----------------------------------------------------------------------------
     ! ----------------------------------------------------------------------------
     ! Search terminated by limit, no solution found.
     ! Number of branches     : 0
     ! Number of fails        : 0
     ! Total memory usage     : 15.0 GB (1.6 GB CP Optimizer + 13.3 GB Concert)
     ! Time spent in solve    : 1253.18s (0.07s engine + 1253.11s extraction)
     ! Search speed (br. / s) : 0
     ! ----------------------------------------------------------------------------
    

    Hi

    As you can see in the previous CP log, CP fails because the time limit to build the model is not enough

    I could increase cp.param.Timelimit but this would also increase the solving time itself

    Why is the timelimit counting both building the model and the solve time ? Would it be possible to set as much as time as required to build the model (litterally no limit at all) and then use the timelimit only to limit the amount of time dedicated to the solve ?

     

    Thanks

     

    David


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: cp time limit

    Posted Tue March 06, 2018 07:06 AM

    Originally posted by: PhilippeLaborie


    What is included in the time limit is not the time to build the model but the time to extract it into the engine. If you want to limit the time taken after extraction in the engine, you can set the time limit after starting the search, like in the example below:

      IloNum TimeLimit = 5.0;
    
      IloCP cp(model);
      cp.startNewSearch();
      IloNum extractionTime = cp.getInfo(IloCP::SolveTime);
      cp.setParameter(IloCP::TimeLimit, extractionTime+TimeLimit);
      while (cp.next()) {
        // ...
      }
      cp.endSearch();
    

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: cp time limit

    Posted Tue March 06, 2018 08:25 AM

    Originally posted by: DavidGravot


    Thanks

    In OPL, is it possible to do it as well ? In particular, if the extraction is done in the generate, would the following snipet work ? 

    thisOplModel.generate();
    cp.param.TimeLimit = tilim;
    cp.solve();
    

     

     


    #DecisionOptimization
    #OPLusingCPOptimizer