Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Is there a better way to get execution time than from eplusout.end?

asked 2016-05-17 04:39:10 -0500

I'm looking into the sensitivity of energy use and execution time to various parameters (timestep, surface convection, geometry level of detail, etc.). For this I need to save the execution time of each run.

As it stands I'm parsing the string in the eplusout.end file:

Elapsed Time=00hr 01min  1.00sec

But is there a better way? I've had a look in the SQLite file but can't see anything.

edit retag flag offensive close merge delete



I don't think there's a better way (and it's really easy to parse out a one-line file in this case), aside from saving your timestamp prior to simulation and then after it using the programming language you use to launch the simulation (I'm assuming you're using Python to launch your sims)

Julien Marrec's avatar Julien Marrec  ( 2016-05-17 04:49:48 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-05-17 05:24:49 -0500

Here's the Python I'm using in any case:

import re

def get_execution_time(eplusend):
    """Get the execution time in seconds.

    eplusend : str
        Path to the .end file.


    with open(eplusend, 'r') as f:
        text =
    time = text.split(';')[-1]
    h, m, s, ms = [int(n) for n in re.findall('\d+', time)]
    secs = (h * 60 * 60 +
            m * 60 +
            s +
            ms / 100.0)

    return secs
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops


Question Tools

1 follower


Asked: 2016-05-17 04:39:10 -0500

Seen: 133 times

Last updated: May 17 '16