parameters

class parameters.AbstractFieldSelector(field_name)[source]

Base class for selectors that modify one field in one or more objects in an EnergyPlus building

Parameters:field_name – Name of the field to select
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
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
set(building, value) → None[source]

Sets this field in the building to the provided value

Parameters:
  • building – the building to modify
  • value – the value to set this field to
Returns:

class parameters.Category(elements)[source]
Parameters:elements
decode(value)[source]

Decodes a value from its internal representation.

encode(value)[source]

Encodes a value into its internal representation.

class parameters.CategoryParameter(options, **kwargs)[source]
Parameters:options (list) – a list of possible value this parameter can be set to
sample(value)[source]

Takes a value in the range 0-1 and returns a valid value for this parameter

Parameters:value
validate(value)[source]

Checks if value is a valid value for this parameter.

Parameters:value – The value to check
Returns:True if the value is valid False otherwise
class parameters.FieldSelector(class_name = None, object_name = None, field_name = 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
get_objects(building) → List[source]

Retrieves the objects that this selector will affect from the building.

Parameters:building – the building to search
Returns:a list of the objects found
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
get_objects(building)[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.GenericSelector(set = None, get = None, setup = None)[source]

A selector that supports custom get/set functions

Parameters:
  • set
  • get
  • setup
setup(building)[source]

Modifies the building so that it is ready for this selector

class parameters.Parameter(selector = None, value_descriptor = None, **kwargs)[source]
Parameters:
  • selector – a Selector describing how to modify the building
  • value_descriptor – a Descriptor specifying which values to use
  • setup – a setup function to run on the building
platypus_type

The platypus equivalent of this parameter

sample(value)[source]

Takes a value in the range 0-1 and returns a valid value for this parameter

Parameters:value (float) –
transformation_function(building, value) → None[source]

Mutates the building based on the value provided.

Parameters:
  • building – Building to modify
  • value – Value to set
validate(value)[source]

Checks if value is a valid value for this parameter.

Parameters:value (float) –
Returns:True if the value is valid False otherwise
class parameters.RangeParameter(min_val, max_val)[source]

Represents an aspect of a building that can take on value from an interval.

Parameters:
  • min_val (float) – Minimum value for the range
  • max_val (float) – Maximum value for the range
pandas_type

alias of builtins.float

sample(value)[source]

Transforms a value in [0, 1] into a value in [min, max]. This transformation is uniform.

Parameters:value – a value in the interval [0, 1]
Returns:a value from the interval [min, max]
validate(val)[source]

Checks if value is a valid value for this parameter.

Parameters:value – The value to check
Returns:True if the value is valid False otherwise
parameters.expand_plist(pList) → 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:pList (keyFormat) – Nested dictionary
Returns:A list of proper inputs
parameters.wwr(value_descriptor = RangeParameter(0.01, 0.99), **kwargs) → Parameter[source]

Makes a window-to-wall-ratio parameter.

Parameters:value_descriptor – a parameter describing the valid window-wall-ratios
Returns:Parameter