Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Why "Elapsed time" is different from a datetime difference?

  • 1.  Why "Elapsed time" is different from a datetime difference?

    Posted Fri December 07, 2018 04:15 PM

    Originally posted by: Yari


    Hi, I'm trying to get the solving time of an optimization problem. I've followed what's suggested here http://www-01.ibm.com/support/docview.wss?uid=swg21401522 but the resulting time is different from what's shown in the Engine log tab under the Elapsed time part. For example I get Elapsed time = 0.06sec and the manually calculated Solving time ~= 102.282226562 (which I believe it's 0.10sec).

    Is the latter bigger because it's considering both the solving time + a sort of model initialization time?

    Thanks


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Why "Elapsed time" is different from a datetime difference?



  • 3.  Re: Why "Elapsed time" is different from a datetime difference?

    Posted Fri December 07, 2018 04:36 PM

    Originally posted by: Yari


    Hello again Alex, thanks a lot for the prompt reply.

    Maybe I did not provide enough context or I'm missing something. I'm using OPL with no api so I don't think what's referenced in that link is applicable in my case since it's referring to cplex and java.

    What I'm doing now is

    float temp;
    execute{
        var before = new Date();  
        temp = before.getTime();
    }
     
     // optimization problem definition
     // constraints
     
     execute{
        var after = new Date();
        writeln(after);
        writeln("solving time ~= ",after.getTime()-temp); 
     }
    

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Why "Elapsed time" is different from a datetime difference?

    Posted Sat December 08, 2018 03:12 AM