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

Is it possible to remove the energy plus simulation log while running it from eppy?

asked 2021-11-03 05:10:00 -0500

Michel's avatar

updated 2021-11-03 09:51:13 -0500

I am running large energyplus iterations from python. And I want to remove the simulation logs

edit retag flag offensive close merge delete

Comments

What do you mean by simulation log. Are you referring to the outputs that E+ makes to the console/screen ?

santoshphilip's avatar santoshphilip  ( 2021-12-04 02:08:20 -0500 )edit

yes the output it makes on the screen as it is simulating the model

Michel's avatar Michel  ( 2021-12-04 05:54:39 -0500 )edit

there has been a recent pull request that may be your solution. see https://github.com/santoshphilip/eppy... and https://github.com/santoshphilip/eppy... It is now in the develop branch of eppy

santoshphilip's avatar santoshphilip  ( 2021-12-04 09:29:01 -0500 )edit
1

Hi,

I'm actually the guy who made that pull request.

If you're talking about some red EnergyPlus Completed Successfully messages, it appears that later versions of E+ log them as errors.

The solution is to redirect stderr to null.

You can either clone the developer version of eppy and use that, or you can just get the updated runfunctions.py file from the develop branch and replace your original file with it. Do not forget to set the verbose mode to s after before restarting!

DimitrisMantas's avatar DimitrisMantas  ( 2021-12-04 10:50:30 -0500 )edit
1

I’ll make a new release of eppy that will include this pull request

santoshphilip's avatar santoshphilip  ( 2021-12-04 12:39:50 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2022-02-08 19:34:45 -0500

DimitrisMantas's avatar

I'm so sorry for taking so long to answer; the last couple of months have been quite hectic!

So, as mentioned back in December, it appears that newer versions of E+ log the EnergyPlus Completed Successfullymessages as errors - or at least that's what eppy seems to think.

This means that the q verbose mode is not actually silent, even if one's model is error-free, and this is potentially unwanted behavior in cases where eppy is used in conjunction with another module that also prints stuff to the console. For example, if you're running multiple E+ simulations with various IDF files in order to optimize a specific cariable, such as an HVAC setpoint, then it is useful to print relevant metrics at specified time intervals. However, if eppy is constantly printing stuf to the console, the output that actually matters is obscured by the aforementioned messages.

That being said, the above-mentioned behavior can be "fixed" as of eppy v0.5.57 by setting the verbose mode to s for "silent". This option differs from the usual q, since it redirects both stdout and stderr to null, as opposed to only the former. Of course, one must make sure that their model is error-free before using this functionality, since it completely disables all module output.

A usage example of the s mode would be the following:

eppy.modeleditor.IDF(idf_filepath, epw_filepath).run(output_directory=output_filepath, verbose="s").

Also, note that eppy v0.5.57 or later support both upper- and lower-case verbose modes, such that verbose="S" and verbose="s" are both valid.

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

Careers

Question Tools

1 follower

Stats

Asked: 2021-11-03 05:10:00 -0500

Seen: 206 times

Last updated: Nov 03 '21