parameters
Classes used to represent the attributes of the building that can be varied, such as the thickness of the insulation, or the window to wall ratio. These parameters are separate from the value that they take on during any evaluation of the model.
- class parameters.AbstractFieldSelector(field_name)[source]
Base class for selectors that modify one field in one or more objects in an EnergyPlus building
- add(building, value) None [source]
Adds to this field in the building by the provided value
- Parameters:
building – the building to modify
value – the value to add to this field
- Returns:
- get(building) List [source]
Gets the current values of this field from a building
- Parameters:
building – the building to retrieve values from
- Returns:
a list containing the current values of this selector’s fields
- abstract get_objects(building) List [source]
Returns a list of the object this selector applies to
- Parameters:
building – the building to search for objects
- Returns:
a list of the objects this selector applies to
- class parameters.CategoryParameter(options: Iterable, **kwargs)[source]
Represents value that is selected from a list of possible values.
Warning
CategoryParameter is actually a kind of
Descriptor
, not aParameter
. This naming may be confusing.- Parameters:
options – a list of possible value this parameter can be set to
- class parameters.FieldSelector(class_name: Optional[str] = None, object_name: Optional[str] = None, field_name: Optional[str] = None)[source]
A selector that modifies one or more fields in an EnergyPlus building, based on the class, object and field names
- Parameters:
class_name – class of the object to modify ex: ‘Material’
object_name – name of the object to modify ex: ‘Mass NonRes Wall Insulation’
field_name – name of the field to modify ex: Thickness
- class parameters.FilterSelector(get_objects, field_name)[source]
A selector that uses a custom function to find which objects it should modify
- Parameters:
get_objects – a function that takes a building and returns the objects this selector should modify
field_name – the field to modify
- class parameters.GenericSelector(set: Optional[Callable] = None, get: Optional[Callable] = None, setup: Optional[Callable] = None)[source]
A selector that supports custom get/set functions
- Parameters:
set – The function to use when setting. Must accept a building and a value. Can modify the building in any way.
get – The function to use when getting a value from a building. Must accept a building, and should return a list of the current values of the fields this selector affects.
setup – The function to use when setting up the building. This function must accept a building. It may modify the building in any way. This will be run once when the evaluator is initialized with a building. (or when the building the evaluator uses is changed.)
- get(building)[source]
A custom function for getting the current values of this field from a building
- Parameters:
building – the building to retrieve values from
- class parameters.Parameter(selector: Optional[Selector] = None, value_descriptors: Optional[Union[Descriptor, List[Descriptor]]] = None, name='', *, value_descriptor: Optional[Descriptor] = None)[source]
- Parameters:
selector – a Selector describing how to modify the building
value_descriptors – a Descriptor specifying which values to use
name – the name of the Parameter. Used for readability and column labelling.
- property name: str
Deprecated since version 2.0.0.
Parameters are no longer nameable. Use the name(s) of this Parameter’s Descriptor(s) instead
- property platypus_type
The platypus equivalent of this parameter
Deprecated since version 2.0.0: Does not support multiple Descriptors per Parameter.Use the platypus_type of this Parameter’s Descriptor(s) instead.
- sample(value: float)[source]
Takes a value in the range 0-1 and returns a valid value for this parameter
Deprecated since version 2.0.0: Does not support multiple descriptors per parameter.Use the sample method of the this Parameter’s Descriptor(s) instead.
- transformation_function(building, value_dict) None [source]
Mutates the building based on the value provided.
- validate(value)[source]
Checks if value is a valid value for this parameter.
- Parameters:
value –
- Returns:
True if the value is valid False otherwise
Deprecated since version 2.0.0: Does not support multiple Descriptors per Parameter.Use the validate method of this Parameter’s Descriptor(s) instead.
- property value_descriptor: Descriptor
Deprecated since version 2.0.0.
Does not support multiple Descriptors per Parameter.Use the value_descriptors of this Parameter instead.
- class parameters.ParameterEH(*args, **kwargs)[source]
A parameter for use with EnergyHub
Deprecated since version 1.6.0: Use a
PathSelector
and aParameter
instead. These have been swapped in automatically.
- class parameters.PathSelector(parameter_path=None)[source]
A Selector for modifying EnergyHub objects using a path.
- Parameters:
parameter_path – the path to the parameter to modify for the EnergyHub
- get(hub)[source]
Get the current value of this attribute of the building
- Parameters:
building –
- Returns:
- class parameters.RangeParameter(min_val: float = 0, max_val: float = inf, name='')[source]
Represents a value that is contained in an interval.
Warning
RangeParameter is actually a kind of
Descriptor
, not aParameter
. This naming may be confusing.- Parameters:
max_val – the minimum value
min_val – the maximum value
- pandas_type
alias of
float
- parameters.expand_plist(pList: Dict[str, Dict[str, Tuple[float, float]]]) List [source]
This function expands a nested dictionary of the correct format into a list of inputs.
The dictionary should have the format: {‘idf object name’: {‘idf object1 property name’: (min_value, max_value)}
Both layers of the dictionaries can have as many names as desired
- parameters.wwr(value_descriptor=None, **kwargs) Parameter [source]
Makes a window-to-wall-ratio parameter.
- Parameters:
value_descriptor – a parameter describing the valid window-wall-ratios Defaults to RangeParameter(0.01, 0.99, name=”Window to Wall Ratio”)
- Returns:
Parameter
- class parameters.wwrSelector[source]
Selector
for window to wall ratio.- get(building)[source]
Get the current value of this attribute of the building
- Parameters:
building –
- Returns: