Skip to main content

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

obgeneration-0.1.3.tar.gz (203.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

obgeneration-0.1.3-py3-none-any.whl (230.8 kB view details)

Uploaded Python 3

File details

Details for the file obgeneration-0.1.3.tar.gz.

File metadata

  • Download URL: obgeneration-0.1.3.tar.gz
  • Upload date:
  • Size: 203.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for obgeneration-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c0ff89c585c51a10cf274fc9eb87b1430b3633abc2877740c7dd43054bcd0399
MD5 3a5434fd975806ac681283548e0c2a27
BLAKE2b-256 907ecccdd5227d0bf53a48f7a75a9122f3a2066ab7eb3cfcc2e70429f75c11ee

See more details on using hashes here.

File details

Details for the file obgeneration-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: obgeneration-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 230.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for obgeneration-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 08362d7d8a028993b5bde4d312f344a573228058c12070a3cf089f293129fdd6
MD5 8df0b10d86329fd6d7880a0e9823a468
BLAKE2b-256 1940c1fc301817b638c2cafdd062332c751383fb8ab938125819dc1c6103e965

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page