witheppy.eppyhelpers package¶
Submodules¶
witheppy.eppyhelpers.extfields module¶
functions to work with extensiblefields
- witheppy.eppyhelpers.extfields.extendlist(lst, size, fillwith='')[source]¶
extend a list to length size using fillwith
- witheppy.eppyhelpers.extfields.extensiblefields2list(idfobject, nested=True)[source]¶
returns extensible fields of idfobject as a list
It is useful to have the fields as a list. It is easy to manipulate the items in the list, by using the list functions such as pop, insert, remove etc. This list can be put back in the idfobject by using the function list2extensiblefields(…)
if nested=True, a nested list will be returned. With nested=True, BUILDINGSURFACE:DETAILED will return [(1,2,3),(2,3,4),(3,4,5)]. With nested=False, it will return [1,2,3,2,3,4,3,4,5]
- Parameters:
idfobject (eppy.bunch_subclass.EpBunch) – an idfobject such as BRANCHLIST, BUILDINGSURFACE:DETAILED etc.
- Returns:
all the extended field values as a flat list or a nested list
- Return type:
list
- witheppy.eppyhelpers.extfields.grouper(iterable, n, fillvalue=None)[source]¶
Collect data into fixed-length chunks or blocks
from https://docs.python.org/2/library/itertools.html#recipes grouper(‘ABCDEFG’, 3, ‘x’) –> ABC DEF Gxx
- witheppy.eppyhelpers.extfields.list2extensiblefields(idfobject, lst)[source]¶
Replaces the items in the extensible fields with items in lst
This function is a counterpart to the function extensiblefields2list(). The list returned by extensiblefields2list can be changed and put back into the idfobject by this function
- Parameters:
idfobject (eppy.bunch_subclass.EpBunch) – an idfobject such as BRANCHLIST, BUILDINGSURFACE:DETAILED etc.
lst (list) – This list will replace the items in the extended fields of the idfobject
- Returns:
the idfobject is changed in place and returned by the function
- Return type:
eppy.bunch_subclass.EpBunch
witheppy.eppyhelpers.geometry module¶
witheppy.eppyhelpers.hvac module¶
witheppy.eppyhelpers.iddhelpers module¶
helper functions to work with the idd
- witheppy.eppyhelpers.iddhelpers.beginextensible_at(objidd)[source]¶
Return the index of the field that is the start of the extensible fields.
In the idd, this is tagged by begin-extensible
from the documentation in the file Energy+.idd:
begin-extensible
Marks the first field at which the object accepts an extensible field set. A fixed number of fields from this marker define the extensible field set, see the object code extensible for more information.
- Parameters:
objidd (list) – The idd for a specific idfobject
- Returns:
index of the field that is the start of the extensible fields
- Return type:
int
- witheppy.eppyhelpers.iddhelpers.hasextensible(objidd)[source]¶
Return the value of # in extensible:<#>if there is an extensible field. Return None if there is no extensible fields
from the documentation in the file Energy+.idd:
extensible:<#>
This object is dynamically extensible – meaning, if you change the IDD appropriately (if the object has a simple list structure – just add items to the list arguments (i.e. BRANCH LIST). These will be automatically redimensioned and used during the simulation. <#> should be entered by the developer to signify how many of the last fields are needed to be extended (and EnergyPlus will attempt to auto-extend the object). The first field of the first instance of the extensible field set is marked with begin-extensible.
Return the value of #
- Parameters:
objidd (list) – The idd for a specific idfobject
- Returns:
lastfields (int) – number of fields that are extended fields that repeat
lastfields (None) – if there are no extended fields