eppy.runner package

Submodules

eppy.runner.run_functions module

Run functions for EnergyPlus.

exception eppy.runner.run_functions.EnergyPlusRunError[source]

Bases: Exception

eppy.runner.run_functions.install_paths(version=None, iddname=None)[source]

Get the install paths for EnergyPlus executable and weather files.

We prefer to get the install path from the IDD name but fall back to getting it from the version number for backwards compatibility and to simplify tests.

Parameters:
  • version (str, optional) – EnergyPlus version in the format “X-X-X”, e.g. “8-7-0”.
  • iddname (str, optional) – File path to the IDD.
Returns:

  • eplus_exe (str) – Full path to the EnergyPlus executable.
  • eplus_weather (str) – Full path to the EnergyPlus weather directory.

eppy.runner.run_functions.multirunner(args)[source]

Wrapper for run() to be used when running IDF and EPW runs in parallel.

Parameters:args (list) – A list made up of a two-item list (IDF and EPW) and a kwargs dict.
eppy.runner.run_functions.parse_error(tmp_err, err_file)[source]

Add contents of stderr and eplusout.err and put it in the exception message.

Parameters:
  • tmp_err – file-like
  • err_file – str
Returns:

str

eppy.runner.run_functions.paths_from_iddname(iddname)[source]

Get the EnergyPlus install directory and executable path.

Parameters:

iddname (str, optional) – File path to the IDD.

Returns:

  • eplus_exe (str) – Full path to the EnergyPlus executable.
  • eplus_home (str) – Full path to the EnergyPlus install directory.

Raises:
  • AttributeError (TypeError on Windows) – If iddname does not have a directory component (e.g. if None).
  • ValueError – If eplus_exe is not a file.
eppy.runner.run_functions.paths_from_version(version)[source]

Get the EnergyPlus install directory and executable path.

Parameters:version (str, optional) – EnergyPlus version in the format “X-X-X”, e.g. “8-7-0”.
Returns:
  • eplus_exe (str) – Full path to the EnergyPlus executable.
  • eplus_home (str) – Full path to the EnergyPlus install directory.
eppy.runner.run_functions.prepare_run(run_id, run_data)[source]

Prepare run inputs for one of multiple EnergyPlus runs.

Parameters:
  • run_id – An ID number for naming the IDF.
  • run_data – Tuple of the IDF and keyword args to pass to EnergyPlus executable.
Returns:

Tuple of the IDF path and EPW, and the keyword args.

eppy.runner.run_functions.run(idf=None, weather=None, output_directory='', annual=False, design_day=False, idd=None, epmacro=False, expandobjects=False, readvars=False, output_prefix=None, output_suffix=None, version=False, verbose='v', ep_version=None)[source]

Wrapper around the EnergyPlus command line interface.

Parameters:
  • idf (str) – Full or relative path to the IDF file to be run, or an IDF object.
  • weather (str) – Full or relative path to the weather file.
  • output_directory (str, optional) – Full or relative path to an output directory (default: ‘run_outputs)
  • annual (bool, optional) – If True then force annual simulation (default: False)
  • design_day (bool, optional) – Force design-day-only simulation (default: False)
  • idd (str, optional) – Input data dictionary (default: Energy+.idd in EnergyPlus directory)
  • epmacro (str, optional) – Run EPMacro prior to simulation (default: False).
  • expandobjects (bool, optional) – Run ExpandObjects prior to simulation (default: False)
  • readvars (bool, optional) – Run ReadVarsESO after simulation (default: False)
  • output_prefix (str, optional) – Prefix for output file names (default: eplus)
  • output_suffix (str, optional) –
    Suffix style for output file names (default: L)
    L: Legacy (e.g., eplustbl.csv) C: Capital (e.g., eplusTable.csv) D: Dash (e.g., eplus-table.csv)
  • version (bool, optional) – Display version information (default: False)
  • verbose (str) –
    Set verbosity of runtime messages (default: v)
    v: verbose q: quiet s: silent
  • ep_version (str) – EnergyPlus version, used to find install directory. Required if run() is called with an IDF file path rather than an IDF object.
Returns:

str

Return type:

status

Raises:
  • CalledProcessError
  • AttributeError – If no ep_version parameter is passed when calling with an IDF file path rather than an IDF object.
eppy.runner.run_functions.runIDFs(jobs, processors=1)[source]

Wrapper for run() to be used when running IDF5 runs in parallel.

Parameters:
  • jobs (iterable) – A list or generator made up of an IDF5 object and a kwargs dict (see run_functions.run for valid keywords).
  • processors (int, optional) – Number of processors to run on (default: 1). If 0 is passed then the process will run on all CPUs, -1 means one less than all CPUs, etc.
eppy.runner.run_functions.wrapped_help_text(wrapped_func)[source]

Decorator to pass through the documentation from a wrapped function.

Module contents

version number