Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  time limit

    Posted 08/04/12 03:43 AM

    Originally posted by: Selena1


    Hello,

    My problem is big and I know it will take hours to run it to optimality. I want to set a maximum running time to 2 hours. How can I do it in ilog cplex optimization studio?

    Regards,
    Selena
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: time limit

    Posted 08/09/12 08:14 AM

    Originally posted by: SystemAdmin


    Hi
    Did you try TiLim parameter in cplex solver?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: time limit

    Posted 08/22/17 10:40 AM

    Originally posted by: liguo66


    hi

    how to use tilim.

    i use it like this before minimize. appears 2 errors.(they are Chinese characters and not displayed properly)

    execute{
            cplex.tilim = 120;
    }

    my code is simple :

    /*********************************************
     * OPL 12.7.0.0 Model
     *********************************************/
    using CP;

    int nbJobs = ...;
    int nbMchs = ...;

    range Jobs = 0..nbJobs-1;
    range Mchs = 0..nbMchs-1;

    int OpDurations[j in Jobs][m in Mchs] = ...;

    dvar interval itvs[j in Jobs][m in Mchs] size OpDurations[j][m];
    dvar sequence mchs[m in Mchs] in all(j in Jobs) itvs[j][m];

    execute{
            cplex.tilim = 120;
    }


    minimize sum(j in Jobs) endOf(itvs[j][nbMchs-1]);
    subject to {
      forall (j in Jobs, o in 0..nbMchs-2)
        endBeforeStart(itvs[j][o], itvs[j][o+1]);
      forall (m in Mchs)
        noOverlap(mchs[m]);
      forall (m in Mchs:0<m)
        sameSequence(mchs[0], mchs[m]);
       
    }

    execute {
      for (var j = 0; j <= nbJobs-1; j++) {
        for (var o = 0; o <= nbMchs-1; o++) {
          write(itvs[j][o].start + " ");
        }
        writeln("");
      }
    }:

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: time limit

    Posted 08/22/17 01:58 PM

    Hi

    with CPo you d rather write

    execute{
            cp.param.timelimit= 120;
    }

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: time limit

    Posted 08/24/17 09:21 AM

    Originally posted by: liguo66


    it works thanks very munch!


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: time limit

    Posted 03/12/18 01:41 AM

    Originally posted by: sandeepsinghchauhan


    Hello Alex,

    According to your suggestion for execution time limit

    execute{
                cp.param.timelimit= 120;
        }

    I have also put the same in my model. But my model stop 00:02:09:38. But I think it should be stop at 00:02:00:00? Please help me to calrify this doubt


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: time limit

    Posted 03/12/18 12:53 PM

    Hi,

    can you try with oplrun ?

    the timelimit is for the search and does not include OPL part, this could explain.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer