Occupancy generation models
Project description
Occupant Behavior Generation
obgeneration generates annual residential occupant-behavior schedules from a structured occupant profile.
Outputs include:
- occupancy fraction
- lighting usage
- equipment power
- domestic hot water usage
- HVAC setpoints
- window opening fraction
Structure
src/obgeneration/
├── model/ Pydantic input models
├── generator/ Schedule generators and orchestrator
├── stochastic/ Probability distributions and Markov logic
└── data/ Packaged CSV/JSON runtime assumptions
Installation
git clone <repo-url>
cd OccupancyGeneration
uv sync
For development:
uv sync --extra dev
Usage
from obgeneration.model import Occupant
from obgeneration.generator import OccupantBehavior
profile = Occupant.from_json_file("test/unit/input/OB_1.json")
annual = OccupantBehavior.to_OB_annual(
resolution_mins=15,
occupant_profile=profile,
)
print(annual.num_occupants)
print(len(annual.occupancy_schedule))
Generator Results
The generator convenience methods return structured result models rather than bare tuples. For example:
from obgeneration.generator import OccupancyGenerator
result = OccupancyGenerator.generate_with_defaults(
occupancy=profile.occupancy,
resolution_mins=15,
rng=42,
)
print(result.peak_value)
print(len(result.schedule))
For explicit assumptions and downstream integration, use generate_result(...):
from obgeneration.generator import (
ClusterAssumptions,
OccupancyGenerator,
)
result = OccupancyGenerator.generate_result(
occupancy=profile.occupancy,
cluster_assumptions=ClusterAssumptions.default(),
resolution_mins=15,
rng=42,
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file obgeneration-0.1.4.tar.gz.
File metadata
- Download URL: obgeneration-0.1.4.tar.gz
- Upload date:
- Size: 203.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ded1be76747abb15c997ee4d2eeb403b39e0a7455b1db5127f3b92ff817abe4
|
|
| MD5 |
efd57d8a3a60a4ae13d6d6be673b95e6
|
|
| BLAKE2b-256 |
7e171884445d1433535d9e567ef879ee3f45e087ab4b5af4a63c86c248828d1f
|
File details
Details for the file obgeneration-0.1.4-py3-none-any.whl.
File metadata
- Download URL: obgeneration-0.1.4-py3-none-any.whl
- Upload date:
- Size: 230.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0dc954df903cf2479ba4ed974a944a0faeab463e029f9b27981412b2fc9eeee
|
|
| MD5 |
8ded7e9fac33a8e4b4f82a47bb48ef4b
|
|
| BLAKE2b-256 |
28e4c9e31b9cb49461ae082876a81f9f723d72df3b5f4e4bc6493c7e2c3a70e5
|