problem

class problem.EPProblem(inputs = None, outputs, contraints = None, converters = None, **kwargs)[source]

A problem with defaults that are appropriate for EnergyPlus simulations

Parameters:
  • inputs
  • outputs
  • contraints
  • converters
class problem.Problem(inputs = None, outputs = None, constraints = None, constraint_bounds = None, minimize_outputs = None, converters = None)[source]

A class that collects all of the inputs, outputs and constraints related to a building.

Parameters:
  • inputs – A list of Parameters, or an integer. If a list is used, strings are converted to Parameters and this list determines the valid inputs. If an integer, this problem accepts that many inputs.
  • outputs – A list of Objectives, or an integer. If a list is used, strings are converted to Objectives and this list determines the valid inputs. If an integer, this problem requires that many outputs
  • constraints
  • constraint_bounds
  • minimize_outputs
  • converters
convert(io_object, part) → IOBase[source]
Parameters:
  • io_object – An object that should be converted to a parameter, objective or constraint
  • part – one of ‘inputs’, ‘outputs’ or ‘constraints’ describing what to convert io_object to
Returns:

the converted object

expand_parts(parts) → List[source]

Expands ‘auto’ and ‘all’ to the correct lists of parts, and wraps single parts in a list

Parameters:parts (Union[str,List[str]]) – Parts to be wrapped
Returns:A list of the parts
names(parts = "auto") → List[source]
Parameters:parts – one of {‘inputs’, ‘outputs’, ‘constraints’, ‘violation’, ‘all’, ‘auto’}
Returns:the names requested
to_df(table, parts = "auto") → DataFrame[source]

Converts the given table to a DataFrame that matches this problem’s input/output format

Parameters:
  • table – a table to be converted to a DataFrame. Must have the right number of columns.
  • parts – inputs, outputs, constraints or all, depending on which data the DataFrame contains
Returns:

A DataFrame containing the same data as the original table.

to_platypus() → Problem[source]

Converts this problem to a platypus problem. No evaluator will be included.

Returns:A corresponding platypus problem