opyplus.Epm

class opyplus.Epm(json_data=None, check_required=True, check_length=True, idd_or_version=None)

Energyplus model.

An Epm is an Energy Plus Model. It can come from and idf, a epjson (not coded yet), or a json. It can be transformed in an idf, an epjson (not coded yet) or a json.

Parameters:
json_data: json serializable object, default None

if provided, Epm will be filled with given objects

check_length: boolean, default True

If True, will raise an exception if a field has a bigger length than authorized. If False, will not check.

check_required: boolean, default True

If True, will raise an exception if a required field is missing. If False, not not perform any checks.

idd_or_version: (expert) if you want to use a specific idd, you can require a specific version (x.x.x), or

directly provide an IDD object.

Notes

Eplus version behaviour:

  • if idd_or_version is provided, required idd will be used (may trigger a warning if it is not coherent with json_data version, if any)

  • else if json_data is provided: will use proper idd (according to version field) or trigger a warning if idd is not available and will choose the closest

  • else will use default eplus version used in conf, which is initially set to latest available idd version

Methods

dump_external_files(target_dir_path)

Dump external files.

from_epstf(buffer_or_path[, check_required, ...])

See load.

from_idf(buffer_or_path[, check_required, ...])

See load.

from_json(buffer_or_path[, check_required, ...])

Create Epgm from a json file.

get_comment()

Get comment.

get_external_files()

Get a list of external files available.

get_info()

Get info.

load(buffer_or_path[, check_required, ...])

Load Epgm from a file.

save([buffer_or_path, dump_external_files])

Save Epgm to a file.

set_comment(comment)

Set comment.

set_defaults()

All fields of Epgm with a default value and that are null will be set to their default value.

to_epstf([buffer_or_path, dump_external_files])

See save.

to_idf([buffer_or_path, dump_external_files])

See save.

to_json([buffer_or_path, indent])

Save to json.

to_json_data()

Dump the Epgm to a json-serializable dict.

classmethod from_idf(buffer_or_path, check_required=True, check_length=True, idd_or_version=None)

See load.

to_idf(buffer_or_path=None, dump_external_files=True)

See save.