neuromancer.psl.building_envelope module

class neuromancer.psl.building_envelope.BuildingEnvelope(seed=59, exclude_norms=['Time'], backend='numpy', requires_grad=False, system='Reno_full', set_stats=True, *args, **kwargs)[source]

Bases: ODE_NonAutonomous

building envelope heat transfer model linear building envelope dynamics and bilinear heat flow input dynamics for different building types are downloaded as needed and stored at buildings_parameters/*.mat Models obtained from: https://github.com/drgona/BeSim

T_dist_idx = {'HollandschHuys_ROM100': [221], 'HollandschHuys_full': [221], 'Old_ROM40': [40], 'Old_full': [40], 'RenoLight_ROM40': [40], 'RenoLight_full': [40], 'Reno_ROM40': [40], 'Reno_full': [40], 'SimpleSingleZone': [0]}
equations(x, u, d)[source]
forward(x, u, d)[source]

For compatibility with the System class for open/closed loop simulations

Parameters:
  • x – 2d Matrix (1, nx) # for torch backend generalize to (batchsize, nx)

  • u – (1, nu)

  • d – (1, nd)

Returns:

x_next (1, nx), y_next (1, ny)

get_D(nsim)[source]
get_D_obs(nsim)[source]
get_R(nsim)[source]

For sampling a sequence of reference trajectories

Parameters:

nsim – (int) Length of sequence

Returns:

Matrix nsim X nx0

get_U(nsim, signal=None, **signal_kwargs)[source]

For sampling a sequence of control actions :param nsim: length of sequence :return: Matrix nsim X nU

get_q(u)[source]
get_simulation_args(nsim, x0, U, D)[source]
get_xy()[source]
property params

Four dicts (str: numeric) parameters (could be optimized), variables (exogenous inputs), constants (don’t vary from system to system), Meta-data (physical units, system type, etc.)

Type:

return

property path

Path where model parameter file is stored

simulate(nsim=None, U=None, D=None, x0=None, *args, **kwargs)[source]

Simulate at a minimum needs the number of simulation steps. You can optionally supply U, D, and x0 with or without nsim. If supplying U and D need to supply an extra time step of data.

Parameters:
  • nsim – (int) Number of simulation steps

  • U – (2D array or tensor)

  • D

  • x0

Returns:

systems = ['SimpleSingleZone', 'Reno_full', 'Reno_ROM40', 'RenoLight_full', 'RenoLight_ROM40', 'Old_full', 'Old_ROM40', 'HollandschHuys_full', 'HollandschHuys_ROM100']
property umax

maximal nominal mass flow l/h, maximal temperature difference deg C

property umin

minimal nominal mass flow l/h, minimal temperature difference deg C

property url

Remote github location for model parameter data

class neuromancer.psl.building_envelope.LinearBuildingEnvelope(seed=59, exclude_norms=['Time'], backend='numpy', requires_grad=False, system='Reno_full', set_stats=True, *args, **kwargs)[source]

Bases: BuildingEnvelope

get_U(nsim, signal=None, **signal_kwargs)[source]

For sampling a sequence of control actions :param nsim: length of sequence :return: Matrix nsim X nU

get_q(u)[source]
property umax

maximal nominal mass flow l/h, maximal temperature difference deg C

property umin

minimal nominal mass flow l/h, minimal temperature difference deg C