-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More ruby documentation #1784
Merged
More ruby documentation #1784
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
8d02569
More updates to hvac and schedules.
joseph-robertson 2b6ca50
Remaining TODOs in schedules file.
joseph-robertson 0ffa98e
Latest results.
53c351b
First cut at moving default schedules data out of ruby.
joseph-robertson 3c53c75
Update schedules test file.
joseph-robertson 2adc1e6
Remaining default schedule replacements.
joseph-robertson d734a86
Update schedule generator and tasks.
joseph-robertson 60e10d7
Replacements in defaults and schedules test files.
joseph-robertson 9e8139e
Update docs and validation test file.
joseph-robertson ebaae98
Update TODOs for pv, battery, generator files.
joseph-robertson 88515ff
Refactor schedule generator constants.
joseph-robertson 33a863c
Revert refactor that apparently causes tiny decimal differences.
joseph-robertson 0c20ed7
Add data source columns to both schedules csv files.
joseph-robertson 90451c5
Merge branch 'master' into ruby-docs
joseph-robertson ff54054
Update tasks.rb.
joseph-robertson c08b2aa
More updates for method and name changes.
joseph-robertson c9f989e
Latest results.
5e91e17
Update TODOs in location resource file and other misc places.
joseph-robertson 0d44099
Merge branch 'master' into ruby-docs
joseph-robertson 7c3114b
Sneak in more argument description for heating_system_2_type.
joseph-robertson 540a630
Merge branch 'master' into ruby-docs
joseph-robertson 1974577
Merge branch 'master' into ruby-docs
joseph-robertson 9e3078d
A couple unrelated docs updates. [ci skip]
shorowit 3932abf
Reference a single default schedules location in the docs.
joseph-robertson b6d57d2
Revise heating_system_2_type argument description.
joseph-robertson 1819a25
Replace all @return [void] with @return [nil].
joseph-robertson 9252cf1
Minor cleanup.
shorowit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
Stochastic Occupancy Modeling introduces major changes to most occupant-related schedules. | ||
Occupant activities are now generated on-the-fly and saved to CSV files used by `OpenStudio` Schedule:File objects. | ||
# Stochastic Occupancy Modeling | ||
|
||
The `BuildResidentialScheduleFile` measure introduces major changes to most occupant-related schedules. | ||
|
||
## Overview | ||
|
||
Occupant activities are now generated on-the-fly and saved to CSV files used by OpenStudio/EnergyPlus `Schedule:File` objects. | ||
Schedules are generated using time-inhomogenous Markov chains derived from American Time Use Survey data, supplemented with sampling duration and power level from NEEA RBSA data, as well as DHW draw duration and flow rate data from Aquacraft/AWWA data. | ||
See [Stochastic simulation of occupant-driven energy use in a bottom-up residential building stock model](https://www.sciencedirect.com/science/article/pii/S0306261922011540) for a more complete description of the methodology. | ||
|
||
The `BuildResidentialScheduleFile` measure outputs a schedule CSV file (available inside the `run` folder of each building simulation output). | ||
## Outputs | ||
|
||
The `BuildResidentialScheduleFile` measure outputs schedule CSV files (available inside the `run` folder of each building simulation output). | ||
The schedule CSV file contains the following columns: | ||
* `occupants` | ||
* `lighting_interior` | ||
|
@@ -27,42 +34,108 @@ The `sleeping` column represents the fractional percent of the total number of o | |
|
||
There are the same number of rows as the total simulation time-step (e.g., 35040 if 15-min, 8760 if hourly [8784, if leap year]). | ||
|
||
The `ScheduleGenerator` class uses Markov chain based simulation to generate the schedule.csv. | ||
## The `ScheduleGenerator` | ||
|
||
This class uses Markov chain based simulation to generate the schedule CSV files. | ||
To support that, several pre-generated set of files are used, contained in the following folders: | ||
* `weekday` | ||
* `weekend` | ||
|
||
These two folders contain the Markov chain initial probability, Markov chain transition and also appliance duration probabilities csv files. | ||
These two folders contain the Markov chain initial probability, Markov chain transition and also appliance duration probabilities CSV files. | ||
The appliance duration probabilities here are used during the Markov chain simulation to determine duration of various appliances. | ||
The files are divided into four clusters (cluster0 to cluster3), for 4 occupant behavior types. | ||
|
||
`<enduse>_consumption_dist.csv` | ||
The following sections describe the remaining files found in the schedule generator resources folder. | ||
|
||
### `<enduse>_consumption_dist.csv` | ||
|
||
These files contain the 15-min power consumption kWh samples for the given end use, obtained from RBSA (average 15-min end use kWh for each submetered home; N=number of homes with that end use). | ||
The schedule generator randomly picks one of these values to determine the power level of the appliance schedule. | ||
|
||
`<enduse>_duration_dist.csv` | ||
Here, `<enduse>` may be: | ||
* `clothes_dryer` | ||
* `clothes_washer` | ||
* `cooking` | ||
* `dishwasher` | ||
|
||
### `<enduse>_duration_dist.csv` | ||
|
||
These files contain the samples of runtime duration of different end uses, in 15-min increments, generated from the RBSA dataset. | ||
So, a value of 3 means 45 minutes. | ||
Each row is for one household, and each column is the duration of one instance of the appliance running. | ||
|
||
For the above `<enduse>_consumption_dist.csv` and `<enduse>_duration_dist.csv` files, `<enduse>` may be: | ||
Again, `<enduse>` may be: | ||
* `clothes_dryer` | ||
* `clothes_washer` | ||
* `cooking` | ||
* `dishwasher` | ||
|
||
`<enduse>_cluster_size_probability.csv` | ||
### `<enduse>_cluster_size_probability.csv` | ||
|
||
These files contain the probability distribution of the event cluster size for different domestic hot water end uses, obtained from the HotWaterEventScheduleGenerator Excel file. | ||
The first row is the probability of a cluster size of 1 event, second row for probability of cluster size of 2 events and so on. | ||
|
||
For the above `<enduse>_cluster_size_probability.csv` files, `<enduse>` may be: | ||
Here, `<enduse>` may be: | ||
* `hot_water_clothes_washer` | ||
* `hot_water_dishwasher` | ||
* `shower` | ||
|
||
`constants.rb` | ||
### `<enduse>_event_duration_probability.csv` | ||
|
||
TODO | ||
|
||
Again, `<enduse>` may be: | ||
* `hot_water_clothes_washer` | ||
* `hot_water_dishwasher` | ||
* `shower` | ||
|
||
### `constants.rb` and `schedules.csv` | ||
|
||
These files contain various miscellaneous configurations for the schedule generator. | ||
Their meanings and sources are defined below. | ||
|
||
#### Occupancy Types | ||
|
||
Occupancy cluster types: Mostly Home, Early Regular Worker, Mostly Away, Regular Worker. | ||
Probabilities are derived from ATUS using the k-modes algorithm. | ||
|
||
#### Plug Loads | ||
|
||
This is the baseline schedule for misc plugload, lighting and ceiling fan. | ||
It will be modified based on occupancy. | ||
Television plugload uses the same schedule as misc plugload. | ||
|
||
#### Lighting | ||
|
||
Indoor lighting schedule is generated on the fly. | ||
Garage lighting uses the same schedule as indoor lighting. | ||
Comment on lines
+102
to
+111
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revisit whether this is still true? |
||
|
||
#### Cooking | ||
|
||
Monthly energy use multipliers for cooking stove/oven/range from average of multiple end-use submetering datasets (HEMS, RBSAM, ELCAP, Mass Res 1, Pecan St.). | ||
Power draw distribution is based on csv files. | ||
|
||
#### Clothes Dryer | ||
|
||
Monthly energy use multipliers for clothes dryer from average of multiple end-use submetering datasets (HEMS, RBSAM, ELCAP, Mass Res 1, Pecan St., FSEC). | ||
Power draw distribution is based on csv files. | ||
|
||
#### Clothes Washer | ||
|
||
Monthly energy use multipliers for clothes washer and dishwasher from average of multiple end-use submetering datasets (generally HEMS, RBSAM, ELCAP, Mass Res 1, and Pecan St.). | ||
Power draw distribution is based on csv files. | ||
|
||
#### Dishwasher | ||
|
||
Monthly energy use multipliers for clothes washer and dishwasher from average of multiple end-use submetering datasets (generally HEMS, RBSAM, ELCAP, Mass Res 1, Pecan St., and FSEC). | ||
Power draw distribution is based on csv files. | ||
|
||
#### Water Draw Events | ||
|
||
Probabilities for all water draw events are extracted from DHW event generators. | ||
The onset, duration, events_per_cluster_probs, flow rate mean and std could all refer to the DHW event generator excel sheet ('event characteristics' and 'Start Times' sheet). | ||
|
||
#### Sink | ||
|
||
This file contains various miscellaneous configurations for the schedule generator, and their meanings and sources are defined within the file. | ||
avg_sink_clusters_per_hh -> Average sink cluster per house hold. Set to 6657 for U.S. average of 2.53 occupants per household, based on relationship of 6885 clusters for 25 gpd, from Building America DHW Event Schedule Generator, | ||
Set to 6657 for U.S. average of 2.53 occupants per household, based on relationship of 6885 clusters for 25 gpd, from Building America DHW Event Schedule Generator. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was missing in the README; we'll need to get this TODO filled in.