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

eppy outputs in ubuntu

asked 2018-04-18 19:50:38 -0500

afshin67 gravatar image

updated 2018-04-21 08:43:47 -0500

I use this example from eppy documentation to run a simulation:

iddfile = "/usr/local/EnergyPlus-8-9-0/Energy+.idd"

idfname = "/usr/local/EnergyPlus-8-9-0/ExampleFiles/BasicsFiles/Exercise1A.idf"
epwfile = "/usr/local/EnergyPlus-8-9-0/WeatherData/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"
idf = IDF(idfname, epwfile)

The document says that I should get an output like:

Processing Data Dictionary
Processing Input File
Initializing Simulation
Reporting Surfaces
Beginning Primary Simulation
Initializing New Environment Parameters
Warming up {1}
Warming up {2}
Warming up {3}
Warming up {4}
Warming up {5}
Warming up {6}
Starting Simulation at 07/21 for CHICAGO_IL_USA COOLING .4% CONDITIONS DB=>MWB
Initializing New Environment Parameters
Warming up {1}
Warming up {2}
Warming up {3}
Warming up {4}
Warming up {5}
Warming up {6}
Starting Simulation at 01/21 for CHICAGO_IL_USA HEATING 99.6% CONDITIONS
Writing final SQL reports
EnergyPlus Run Time=00hr 00min  0.24sec

,however, I get nothing in the python. Only I see these new files in the directory that I run the python script: eplusout.audit eplusout.bnd eplusout.dxf eplusout.eio eplusout.end eplusout.err eplusout.eso eplusout.mdd eplusout.mtd eplusout.rdd eplusout.shd. These files include a lot different outputs, but the point is that I could not find any standard way of reading these files through eppy. In the documentation, there is a section Reading outputs from E+ which explains how one can use htmlreader to extract the output of E+ simulations. However, there is no html file among the generated files. I can read those files manually through function in python, but I thought probably I am missing a point and there should a way to get the output of the directly in python. I would appreciate any help and comment.

Thanks, Afshin

edit retag flag offensive close merge delete


Add the following objects to your IDF file

HTML;                    !- Column Separator

AllSummary;              !- Report 1 Name

See if you get the HTML report

santoshphilip gravatar imagesantoshphilip ( 2018-04-19 10:15:10 -0500 )edit

@santoshphilip Thanks for the suggestion. I tried newobject = idf.newidfobject("OutputControl".upper()), but it gives me ValueError: 'OUTPUTCONTROL' is not in list. It seems that my idd file does not have it. Do you know a idd which includes it?

afshin67 gravatar imageafshin67 ( 2018-04-19 13:00:12 -0500 )edit

Additionally, is there any way to get a given output in return of calling not by reading some result file,

afshin67 gravatar imageafshin67 ( 2018-04-19 13:01:18 -0500 )edit

I made my first comment without testing. I'll look to see how to make it work.

Regarding your second comment about getting an output directly after You can probably do it by writing your own function

def runandgetresult(idf):
    """untested code""" # I think this line waits until the run is complete
    htmltablename = functiontomakethename(idf)
    htables = readhtml.titletable(open(htmltablename, 'r'))
    return htables[0]

if your code is useful, I'll add it to eppy

santoshphilip gravatar imagesantoshphilip ( 2018-04-19 15:49:12 -0500 )edit

I added the objects using: idf.idfobjects['OUTPUTCONTROL:TABLE:STYLE'] = 'HTML; !- Column Separator'idf.idfobjects['OUTPUT:TABLE:SUMMARYREPORTS']= 'AllSummary; !- Report 1 Name', but it complains about CalledProcessError: Command '[u'/usr/local/EnergyPlus-8-9-0/energyplus', u'--output-directory', u'/home/afshin', u'--weather', '/usr/local/EnergyPlus-8-9-0/WeatherData/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw', u'/home/afshin/in.idf']' returned non-zero exit status 1. I am trying to figure out the problem with the route.

afshin67 gravatar imageafshin67 ( 2018-04-19 15:52:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-23 10:16:49 -0500

santoshphilip gravatar image

Generating the HTML file

To generate an html input file, your IDF file has to have the objects that will generate the HTML file. Add these two objects to your IDF file, and it will generate the HTML file.

    AllSummary;              !- Report 1 Name
    HTML,                    !- Column Separator
    None;                    !- Unit Conversion

Reading Energyplus outputs thru eppy or python.

  • Eppy has functions to read the HTML file. It is documented here
  • EnergyPlus will also generate csv files

if you are using eppy to generate the csv files you have to do

Note: some of the earlier version of EnergyPlus will not run with readvars=True. It will run on EnergyPlus-8-9-0

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


Question Tools

1 follower


Asked: 2018-04-18 19:50:38 -0500

Seen: 190 times

Last updated: Apr 23 '18