Decision Optimization

Decision Optimization

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

 View Only
  • 1.  cpu time in OPL

    Posted Thu September 09, 2010 09:13 AM

    Originally posted by: SystemAdmin


    I am solving an MIP using an iterative master-sub decomposition in my OPL script and would like to report the total cpu time. Does anyone know how to report this in OPL 6.3? Thanks.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: cpu time in OPL

    Posted Thu September 09, 2010 10:29 AM

    Originally posted by: Laval


    Hi,

    var before = new Date();
    ...
    solve() your models
    var after = new Date();
    

    (after-before)/1000 is your total time in seconds.
    I hope this answer your question.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: cpu time in OPL

    Posted Thu September 09, 2010 10:44 AM

    Originally posted by: SystemAdmin


    Laval, thanks for the reply.

    Correct me if I am wrong, but I think the date() function will only measure total elapsed time and not cpu time. Cpu time should be different, especially if multiple threads are being used.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: cpu time in OPL

    Posted Thu September 09, 2010 11:33 AM

    Originally posted by: Laval


    You are right. Date () measures the elaspsed time and my suggestion will calculate the runing time of your models including I/O and CPU time. Its an approximation of the CPU time (equal or greater than CPU time). I didn't find any function in OPL that gives the exact CPU time in OPL.
    For parallel optimization, I'm not familiar with it, I hope someonelese can help you on that.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: cpu time in OPL

    Posted Tue September 25, 2012 12:53 PM

    Originally posted by: GertWBelgium


    I also have the same problem with my column generation models. I experimented with Powershell and the "measure-command" command, which also only gave wall clock time...

    I am not a programming wiz, but are there other easy possibilities for running multiple instances and retrieving their CPU-time automatically (that is the cputime of OPLRUN.EXE)?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer