# rwth-ebc/richardsonpy architecture

> Architecture diagram of the GitHub repository rwth-ebc/richardsonpy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rwth-ebc/richardsonpy
- Repository: https://github.com/rwth-ebc/richardsonpy

## Overview

richardsonpy generates stochastic residential occupancy and electric-load profiles. The main workflow creates an occupancy profile, obtains weather radiation, then uses appliance and lighting models to produce a combined load curve; users can also resample time series. Edges follow the sampled callers or README examples. Input data is represented as a single node; detailed wiring for unsampled modules is not inferred.

Main entry points: [`richardsonpy/classes/electric_load.py`](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/electric_load.py) (Electric load builder), [`richardsonpy/classes/stochastic_el_load_wrapper.py`](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/stochastic_el_load_wrapper.py) (Daily profile simulation), [`richardsonpy/classes/occupancy.py`](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/occupancy.py) (Occupancy profile), [`richardsonpy/inputs`](https://github.com/rwth-ebc/richardsonpy/tree/master/richardsonpy/inputs) (Model data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_occupancy["Occupancy modeling"]
  node_occupancy_class["Occupancy profile<br/>[occupancy.py]"]
  node_occupancy_model["State transitions<br/>[occupancy_model.py]"]
end

subgraph group_inputs["Model inputs"]
  node_model_data["Model data"]
  node_weather["Weather radiation<br/>[load_radiation.py]"]
end

subgraph group_load["Electric load modeling"]
  node_electric_load["Electric load builder<br/>[electric_load.py]"]
  node_profile_wrapper["Daily profile simulation"]
  node_appliance["Appliance model<br/>[appliance.py]"]
  node_lighting["Lighting model<br/>[lighting.py]"]
end

subgraph group_utilities["Profile utilities"]
  node_resolution["Resolution conversion"]
end

node_user(("Profile user"))

node_user -->|"requests profile"| node_occupancy_class
node_occupancy_class -->|"computes transitions"| node_occupancy_model
node_occupancy_class -->|"loads probability tables"| node_model_data
node_user -->|"requests radiation"| node_weather
node_user -->|"resamples series"| node_resolution
node_user -->|"requests load profile"| node_electric_load
node_electric_load -->|"runs daily simulation"| node_profile_wrapper
node_electric_load -->|"creates appliance model"| node_appliance
node_electric_load -->|"loads lighting configuration"| node_lighting
node_profile_wrapper -->|"simulates appliance use"| node_appliance
node_profile_wrapper -->|"simulates lighting use"| node_lighting
node_profile_wrapper -->|"loads activity statistics"| node_model_data
node_electric_load -->|"accepts radiation input"| node_weather
node_electric_load -->|"accepts occupancy input"| node_occupancy_class

click node_occupancy_class "https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/occupancy.py"
click node_occupancy_model "https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/functions/occupancy_model.py"
click node_model_data "https://github.com/rwth-ebc/richardsonpy/tree/master/richardsonpy/inputs"
click node_weather "https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/functions/load_radiation.py"
click node_resolution "https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/functions/change_resolution.py"
click node_electric_load "https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/electric_load.py"
click node_profile_wrapper "https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/stochastic_el_load_wrapper.py"
click node_appliance "https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/appliance.py"
click node_lighting "https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/lighting.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_occupancy_class,node_occupancy_model,node_user toneBlue
class node_model_data,node_weather toneAmber
class node_electric_load,node_profile_wrapper,node_appliance,node_lighting toneMint
class node_resolution toneRose
```

## Components

### Occupancy modeling

- [Occupancy profile](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/occupancy.py): `richardsonpy/classes/occupancy.py`
- [State transitions](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/functions/occupancy_model.py): `richardsonpy/functions/occupancy_model.py`

### Model inputs

- [Model data](https://github.com/rwth-ebc/richardsonpy/tree/master/richardsonpy/inputs): `richardsonpy/inputs`
- [Weather radiation](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/functions/load_radiation.py): `richardsonpy/functions/load_radiation.py`

### Electric load modeling

- [Electric load builder](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/electric_load.py): `richardsonpy/classes/electric_load.py`
- [Daily profile simulation](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/stochastic_el_load_wrapper.py): `richardsonpy/classes/stochastic_el_load_wrapper.py`
- [Appliance model](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/appliance.py): `richardsonpy/classes/appliance.py`
- [Lighting model](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/classes/lighting.py): `richardsonpy/classes/lighting.py`

### Profile utilities

- [Resolution conversion](https://github.com/rwth-ebc/richardsonpy/blob/master/richardsonpy/functions/change_resolution.py): `richardsonpy/functions/change_resolution.py`

### Other components

- **Profile user**

## Connections

- Profile user → Occupancy profile: requests profile (evidence: `README.md`)
- Occupancy profile → State transitions: computes transitions (evidence: `richardsonpy/classes/occupancy.py`)
- Occupancy profile → Model data: loads probability tables (evidence: `richardsonpy/classes/occupancy.py`)
- Profile user → Weather radiation: requests radiation (evidence: `README.md`)
- Profile user → Resolution conversion: resamples series (evidence: `README.md`)
- Profile user → Electric load builder: requests load profile (evidence: `README.md`)
- Electric load builder → Daily profile simulation: runs daily simulation (evidence: `richardsonpy/classes/electric_load.py`)
- Electric load builder → Appliance model: creates appliance model (evidence: `richardsonpy/classes/electric_load.py`)
- Electric load builder → Lighting model: loads lighting configuration (evidence: `richardsonpy/classes/electric_load.py`)
- Daily profile simulation → Appliance model: simulates appliance use (evidence: `richardsonpy/classes/stochastic_el_load_wrapper.py`)
- Daily profile simulation → Lighting model: simulates lighting use (evidence: `richardsonpy/classes/stochastic_el_load_wrapper.py`)
- Daily profile simulation → Model data: loads activity statistics (evidence: `richardsonpy/classes/stochastic_el_load_wrapper.py`)
- Electric load builder → Weather radiation: accepts radiation input (evidence: `README.md`)
- Electric load builder → Occupancy profile: accepts occupancy input (evidence: `README.md`)
