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.1.tar.gz (199.5 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.1-py3-none-any.whl (226.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: obgeneration-0.1.1.tar.gz
  • Upload date:
  • Size: 199.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

Hashes for obgeneration-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8b0512816fa86d5172859f0ac2a8f8a36c2c6a9eb6df9d20c8ca2df10bbefda5
MD5 d84d3f61c659cefe1ce0454def88719f
BLAKE2b-256 06c9af391d173e63f33386ea5cf84c50f0a380b5e5bf003b74821bfbaabfe10b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: obgeneration-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 226.2 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

Hashes for obgeneration-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b9621d0505d6c49fe08bfdc0c2c49e7489efcee79a955a5264de7a6f4aeb7f17
MD5 678b79955ff7631580c08d124f0c45df
BLAKE2b-256 ff992f9e79fa6c39fd05cbf95d5dc02b4ccfd20c979a7b5eff3c5b79e6853534

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