for this study has 41 states: one for zone air and the rest for building structure[^3]. It assumes well-mixed air and uses time-invariant convection coefficients. Fixed coefficients imply that the thermal gradients are always in the same direction, whereas EnergyPlus switches coefficients depending on whether the gradient enhances convection [@EnergyPlusReference2011]. In practice, for improved accuracy, the RC network can be adjusted at each step, or a nonlinear model may be used. We have included limited support for radiant transfer using coefficients from EnergyPlus’ `Simple` and `SimpleCombined` convection algorithms [@EnergyPlusReference2011].

![\[fig:Sustain\]The [*Sustain*]{} modeling and simulation environment. (New York Times building shown.)](sustainShotNyTimes){width="90mm"}

The model accepts the following inputs:

-   the outside dry-bulb temperature,

-   the ground temperature, and[^4]

-   heat injected by the control system to the space (positive or negative).

The state equation of the building is $$x_{k+1}=A_{b}x_{k}+B_{w}w_{k}+B_{u}u_{k},\label{eq:buildingStateEquation}$$ where $k$ is the time step (in hours) and $x_{k}$ is the complete temperature state vector containing the zone temperature $x_{k}^{\textrm{zone}}$. The vector $w_{k}$ contains the weather forecast, and $u_{k}$ is the heat injected into the room by the HVAC system. The sign of $u_{k}$ and its constraints can be made negative, or the sign of the vector $B_{u}$ can be reversed, for 