# Diversify Building Programs

![](/files/-MihrcVaJTAN20zfchtu)

![](/files/-MihraisYkGM0qTyx381) - [\[source code\]](https://github.com/ladybug-tools/dragonfly-grasshopper/blob/master/dragonfly_grasshopper/src//DF%20Diversify%20Building%20Programs.py)

Diversify the ProgramTypes assigned to a Building's Room2Ds.

This is useful when attempting to account for the fact that not all rooms are used by occupants according to a strict scheduled regimen. Some rooms will be used more than expected and others less.

This component uses a random number generator and gaussian distribution to generate loads that vary about the original "mean" programs. Note that the randomly generated values assigned by this component will be different every time that this component is run unless and input for seed\_ has been specified.

In addition to diversifying load values, approximately 2/3 of the schedules in the resulting Room2Ds will be offset from the mean by the input schedule\_offset (1/3 ahead and another 1/3 behind).

## Inputs

* **building \[Required]**

  A Dragonfly Building, which will have its room programs diversified.&#x20;
* **occ\_stdev**

  A number between 0 and 100 for the percent of the occupancy people\_per\_area representing one standard deviation of diversification from the mean. (Default 20 percent).&#x20;
* **lighting\_stdev**

  A number between 0 and 100 for the percent of the lighting watts\_per\_area representing one standard deviation of diversification from the mean. (Default 20 percent).&#x20;
* **electric\_stdev**

  A number between 0 and 100 for the percent of the electric equipment watts\_per\_area representing one standard deviation of diversification from the mean. (Default 20 percent).&#x20;
* **gas\_stdev**

  A number between 0 and 100 for the percent of the gas equipment watts\_per\_area representing one standard deviation of diversification from the mean. (Default 20 percent).&#x20;
* **hot\_wtr\_stdev**

  A number between 0 and 100 for the percent of the service hot water flow\_per\_area representing one standard deviation of diversification from the mean. (Default 20 percent).&#x20;
* **infilt\_stdev**

  A number between 0 and 100 for the percent of the infiltration flow\_per\_exterior\_area representing one standard deviation of diversification from the mean. (Default 20 percent).&#x20;
* **sched\_offset**

  A positive integer for the number of timesteps at which all schedules of the resulting programs will be shifted - roughly 1/3 of the programs ahead and another 1/3 behind. (Default: 1).&#x20;
* **timestep**

  An integer for the number of timesteps per hour at which the shifting is occurring. This must be a value between 1 and 60, which is evenly divisible by 60. 1 indicates that each step is an hour while 60 indicates that each step is a minute. (Default: 1).&#x20;
* **seed**

  An optional integer to set the seed of the random number generator that is diversifying the loads. Setting a value here will ensure that the same "random" values are assigned every time that this component is run, making comparison of energy simulation results easier. If not set, the loads assigned by this component will be different every time it is run.&#x20;

## Outputs

* **building**

  The input Dragonfly Building with its programs diversified. The diversified values can be checked by using the "DF Color Room2D Attributes" component.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ladybug.tools/dragonfly-primer/components/3_energy/diversify_building_programs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
