Skip to main content

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,
)

Metadata

Release files for obgeneration 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for obgeneration 0.1.5
File Size Uploaded Provenance Actions
obgeneration-0.1.5.tar.gz 203.7 kB Without provenance Details for obgeneration-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for obgeneration 0.1.5
File Interpreter ABI Platform Actions
obgeneration-0.1.5-py3-none-any.whl Python 3 none any Details for obgeneration-0.1.5-py3-none-any.whl

Total release size: 434.7 kB

Release files / obgeneration-0.1.5.tar.gz

Download URL obgeneration-0.1.5.tar.gz
Size 203.7 kB
Tags Source
SHA-256 checksum
How to use checksums
12875ccf3cdb4701d07e20a158c2a0f0411a3d479c421225b0bd4a6f6355d481
BLAKE2b-256 checksum
How to use checksums
22ca822dc0d36a068a78db5b4390d9681250303e64ecc0e6ba6f607f732576a9
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / obgeneration-0.1.5-py3-none-any.whl

Download URL obgeneration-0.1.5-py3-none-any.whl
Size 231.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a49bccc417bb1eaf4588f15a99add805172b15005bf32e12497a0b72f719bb9d
BLAKE2b-256 checksum
How to use checksums
3cda8d840c4e0212432449a657e3228e5c161397b3c15e8ce1303f51a3baa08e
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for obgeneration 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page