# fzj-iek3-vsa/loadprofilegenerator architecture

> Architecture diagram of the GitHub repository fzj-iek3-vsa/loadprofilegenerator, 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/fzj-iek3-vsa/loadprofilegenerator
- Repository: https://github.com/fzj-iek3-vsa/loadprofilegenerator

## Overview

LoadProfileGenerator is an agent-based residential behavior and energy-load simulation, with a separate MPI-parallel city simulation. The principal workflow is to configure a calculation, validate and construct its runtime model, simulate household behavior and energy use, then produce result files and charts. Its documented capability set also includes transportation and city-scale scenarios; the tree shows dedicated runtime and post-processing subsystems for these. Source excerpts are limited, so the graph includes only relationships supported by the README or SOURCE INDEX and omits uncertain wiring.

Main entry points: [`CalculationEngine/CalcManager.cs`](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalculationEngine/CalcManager.cs) (Household simulation), [`CalculationController/CalcFactories/CalcManagerFactory.cs`](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalculationController/CalcFactories/CalcManagerFactory.cs) (Calculation controller), [`ChartCreator2/ChartProcessorManager.cs`](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/ChartCreator2/ChartProcessorManager.cs) (Charts and reports), [`CitySimulation/Worker.cs`](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/Worker.cs) (Distributed city runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Configuration"]
  node_desktop["Desktop application<br/>[App.xaml.cs]"]
  node_parameters["Calculation parameters<br/>[CalcParameters.cs]"]
  node_controller["Calculation controller"]
  node_integrity["Input integrity"]
end

subgraph group_runtime["Simulation runtime"]
  node_database[("Simulation database<br/>[Simulator.cs]")]
  node_engine["Household simulation<br/>[CalcManager.cs]"]
  node_household["Household model"]
  node_transport["Transportation model"]
  node_energy["Energy storage"]
end

subgraph group_results["Results and analysis"]
  node_resultfiles["Result file tracking"]
  node_postprocess["Post-processing"]
  node_charts["Charts and reports"]
end

subgraph group_city["City simulation"]
  node_cityentry["City simulation entry<br/>[Program.cs]"]
  node_scenarios["City scenarios"]
  node_cityruntime["Distributed city runtime<br/>[Worker.cs]"]
  node_mpi["MPI services<br/>[MPIDistributor.cs]"]
end

node_user(("User"))
node_scenarioauthor(("Scenario author"))
node_mpiimplementation{{"MPI implementation"}}
node_weather{{"Weather profile providers"}}

node_user -.->|"configures"| node_desktop
node_controller -->|"loads inputs"| node_database
node_controller -->|"validates"| node_integrity
node_controller -->|"creates"| node_engine
node_engine -->|"invokes"| node_postprocess
node_engine -->|"invokes"| node_charts
node_engine -->|"uses"| node_resultfiles
node_charts -.->|"uses results"| node_postprocess
node_scenarioauthor -.->|"provides scenarios"| node_scenarios
node_cityentry -.->|"starts"| node_cityruntime
node_cityruntime -.->|"distributes work"| node_mpi
node_mpi -->|"requires"| node_mpiimplementation
node_weather -.->|"supplies profiles"| node_engine

click node_desktop "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/LoadProfileGenerator/App.xaml.cs"
click node_parameters "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/Common/JSON/CalcParameters.cs"
click node_controller "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalculationController/CalcFactories/CalcManagerFactory.cs"
click node_integrity "https://github.com/fzj-iek3-vsa/loadprofilegenerator/tree/master/CalculationController/Integrity"
click node_database "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/Database/Simulator.cs"
click node_engine "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalculationEngine/CalcManager.cs"
click node_household "https://github.com/fzj-iek3-vsa/loadprofilegenerator/tree/master/CalculationEngine/HouseholdElements"
click node_transport "https://github.com/fzj-iek3-vsa/loadprofilegenerator/tree/master/CalculationEngine/Transportation"
click node_energy "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalculationEngine/HouseElements/CalcEnergyStorage.cs"
click node_resultfiles "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/Common/FileFactoryAndTracker.cs"
click node_postprocess "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalcPostProcessor/PostProcessingManager.cs"
click node_charts "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/ChartCreator2/ChartProcessorManager.cs"
click node_cityentry "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/Program.cs"
click node_scenarios "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/Scenarios/CityScenarioImport.cs"
click node_cityruntime "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/Worker.cs"
click node_mpi "https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/MPIDistributor.cs"

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_desktop,node_parameters,node_controller,node_integrity,node_user toneBlue
class node_database,node_engine,node_household,node_transport,node_energy toneAmber
class node_resultfiles,node_postprocess,node_charts toneMint
class node_cityentry,node_scenarios,node_cityruntime,node_mpi toneRose
class node_scenarioauthor,node_mpiimplementation,node_weather toneIndigo
```

## Components

### Configuration

- [Desktop application](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/LoadProfileGenerator/App.xaml.cs): `LoadProfileGenerator/App.xaml.cs`
- [Calculation parameters](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/Common/JSON/CalcParameters.cs): `Common/JSON/CalcParameters.cs`
- [Calculation controller](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalculationController/CalcFactories/CalcManagerFactory.cs): `CalculationController/CalcFactories/CalcManagerFactory.cs`
- [Input integrity](https://github.com/fzj-iek3-vsa/loadprofilegenerator/tree/master/CalculationController/Integrity): `CalculationController/Integrity`

### Simulation runtime

- [Simulation database](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/Database/Simulator.cs): `Database/Simulator.cs`
- [Household simulation](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalculationEngine/CalcManager.cs): `CalculationEngine/CalcManager.cs`
- [Household model](https://github.com/fzj-iek3-vsa/loadprofilegenerator/tree/master/CalculationEngine/HouseholdElements): `CalculationEngine/HouseholdElements`
- [Transportation model](https://github.com/fzj-iek3-vsa/loadprofilegenerator/tree/master/CalculationEngine/Transportation): `CalculationEngine/Transportation`
- [Energy storage](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalculationEngine/HouseElements/CalcEnergyStorage.cs): `CalculationEngine/HouseElements/CalcEnergyStorage.cs`

### Results and analysis

- [Result file tracking](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/Common/FileFactoryAndTracker.cs): `Common/FileFactoryAndTracker.cs`
- [Post-processing](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CalcPostProcessor/PostProcessingManager.cs): `CalcPostProcessor/PostProcessingManager.cs`
- [Charts and reports](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/ChartCreator2/ChartProcessorManager.cs): `ChartCreator2/ChartProcessorManager.cs`

### City simulation

- [City simulation entry](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/Program.cs): `CitySimulation/Program.cs`
- [City scenarios](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/Scenarios/CityScenarioImport.cs): `CitySimulation/Scenarios/CityScenarioImport.cs`
- [Distributed city runtime](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/Worker.cs): `CitySimulation/Worker.cs`
- [MPI services](https://github.com/fzj-iek3-vsa/loadprofilegenerator/blob/master/CitySimulation/MPIDistributor.cs): `CitySimulation/MPIDistributor.cs`

### Other components

- **User**
- **Scenario author**
- **MPI implementation**
- **Weather profile providers**

## Connections

- User → Desktop application: configures
- Calculation controller → Simulation database: loads inputs (evidence: `CalculationController/CalcFactories/CalcManagerFactory.cs`)
- Calculation controller → Input integrity: validates (evidence: `CalculationController/CalcFactories/CalcManagerFactory.cs`)
- Calculation controller → Household simulation: creates (evidence: `CalculationController/CalcFactories/CalcManagerFactory.cs`)
- Household simulation → Post-processing: invokes (evidence: `CalculationEngine/CalcManager.cs`)
- Household simulation → Charts and reports: invokes (evidence: `CalculationEngine/CalcManager.cs`)
- Household simulation → Result file tracking: uses (evidence: `CalculationEngine/CalcManager.cs`)
- Charts and reports → Post-processing: uses results
- Scenario author → City scenarios: provides scenarios
- City simulation entry → Distributed city runtime: starts
- Distributed city runtime → MPI services: distributes work
- MPI services → MPI implementation: requires
- Weather profile providers → Household simulation: supplies profiles
