trnslator.idfclass.run_eplus

trnslator.idfclass.run_eplus(eplus_file, weather_file, output_directory=None, ep_version=None, output_report=None, prep_outputs=False, simulname=None, keep_data=True, annual=False, design_day=False, epmacro=False, expandobjects=True, readvars=False, output_prefix=None, output_suffix=None, version=None, verbose='v', keep_data_err=False, include=None, process_files=False, custom_processes=None, return_idf=False, return_files=False, **kwargs)[source]

Run an EnergyPlus file using the EnergyPlus executable.

Specify run options:

Run options are specified in the same way as the E+ command line interface: annual, design_day, epmacro, expandobjects, etc. are all supported.

Specify outputs:

Optionally define the desired outputs by specifying the prep_outputs attribute.

With the prep_outputs attribute, specify additional outputs objects to append to the energy plus file. If True is specified, a selection of useful options will be append by default (see: OutputPrep for more details).

Parameters
  • eplus_file (str) – path to the idf file.

  • weather_file (str) – path to the EPW weather file.

  • output_directory (str, optional) – path to the output folder. Will default to the settings.cache_folder.

  • ep_version (str, optional) – EnergyPlus version to use, eg: 9-2-0

  • output_report – ‘sql’ or ‘htm’.

  • prep_outputs (bool or list, optional) – if True, meters and variable outputs will be appended to the idf files. Can also specify custom outputs as list of ep-object outputs.

  • simulname (str) – The name of the simulation. (Todo: Currently not implemented).

  • keep_data (bool) – If True, files created by EnergyPlus are saved to the output_directory.

  • annual (bool) – If True then force annual simulation (default: False)

  • design_day (bool) – Force design-day-only simulation (default: False)

  • epmacro (bool) – Run EPMacro prior to simulation (default: False)

  • expandobjects (bool) – Run ExpandObjects prior to simulation (default: True)

  • readvars (bool) – Run ReadVarsESO after simulation (default: False)

  • output_prefix (str, optional) – Prefix for output file names.

  • output_suffix (str, optional) –

    Suffix style for output file names (default: L) Choices are:

    • 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

  • keep_data_err (bool) – If True, errored directory where simulation occurred is kept.

  • include (str, optional) – List input files that need to be copied to the simulation directory. If a string is provided, it should be in a glob form (see pathlib.Path.glob()).

  • process_files (bool) – If True, process the output files and load to a DataFrame. Custom processes can be passed using the custom_processes attribute.

  • custom_processes (dict(Callback)) – if provided, it has to be a dictionary with the keys being a glob (see pathlib.Path.glob()), and the value a Callback taking as signature callback(file: str, working_dir, simulname) -> Any All the file matching this glob will be processed by this callback. Note: they will still be processed by pandas.read_csv (if they are csv files), resulting in duplicate. The only way to bypass this behavior is to add the key “*.csv” to that dictionary.

  • return_idf (bool) – If True, returns the IDF object part of the return tuple.

  • return_files (bool) – It True, all files paths created by the EnergyPlus run are returned.

Returns

a 1-tuple or a 2-tuple
  • dict: dict of [(title, table), …..]

  • IDF: The IDF object. Only provided if return_idf is True.

Return type

2-tuple

Raises

EnergyPlusProcessError.