# datweb07/elephant-herding-optimization-seminar architecture

> Architecture diagram of the GitHub repository datweb07/elephant-herding-optimization-seminar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/datweb07/elephant-herding-optimization-seminar
- Repository: https://github.com/datweb07/elephant-herding-optimization-seminar

## Overview

This repository is a Python EHO seminar demo: users configure an optimization run, watch generations and inspect results, with additional book-example replay, pump-allocation, and repeatable experiment capabilities. The graph separates the GUI, optimizer and objectives, and experiment tooling. Edges are limited to calls shown in excerpts, imports named by the SOURCE INDEX, or README-documented capabilities; unsampled implementation details are not inferred.

Main entry points: [`src/gui/main_window.py`](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/main_window.py) (Main window), [`src/eho/optimizer.py`](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/optimizer.py) (EHO optimizer), [`src/objectives/data_loader.py`](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/data_loader.py) (Scenario and reference loader), [`src/experiment_helpers/runner.py`](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/runner.py) (Experiment runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Interactive demo"]
  node_launcher["App launcher<br/>[main.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_parameters["Run parameters<br/>[parameter_panel.py]"]
  node_worker["Background worker<br/>[worker.py]"]
  node_visualization["Visualization inspector"]
  node_movement["Movement plots<br/>[movement_plot.py]"]
  node_results["Results export<br/>[results_panel.py]"]
  node_book_panel["Book example panel"]
end

subgraph group_core["EHO engine"]
  node_optimizer["EHO optimizer<br/>[optimizer.py]"]
  node_config["Run configuration<br/>[config.py]"]
  node_operators["EHO operators<br/>[operators.py]"]
  node_result["Run history and result<br/>[result.py]"]
end

subgraph group_domain["Objectives and replay"]
  node_rastrigin["Rastrigin objective<br/>[rastrigin.py]"]
  node_pump["Pump allocation objective<br/>[pump_allocation.py]"]
  node_loader["Scenario and reference loader<br/>[data_loader.py]"]
  node_book_replay["Book replay verifier<br/>[book_replay.py]"]
  node_reference_data["Book reference data"]
  node_pump_data["Pump scenarios<br/>[pump_scenarios.csv]"]
end

subgraph group_experiments["Experiment analysis"]
  node_runner["Experiment runner<br/>[runner.py]"]
  node_statistics["Experiment statistics<br/>[statistics.py]"]
  node_plotting["Experiment plotting<br/>[plotting.py]"]
  node_artifacts["Experiment artifacts<br/>[artifacts.py]"]
  node_notebooks["Experiment notebooks"]
end

node_user(("Seminar user"))

node_user -->|"launches"| node_launcher
node_launcher -->|"opens"| node_window
node_user -->|"configures and starts"| node_window
node_window -->|"reads settings"| node_parameters
node_window -->|"loads scenarios"| node_loader
node_window -->|"starts run"| node_worker
node_window -->|"updates progress"| node_visualization
node_window -->|"presents results"| node_results
node_window -->|"shows replay"| node_book_panel
node_worker -->|"runs"| node_optimizer
node_worker -->|"emits progress and result"| node_window
node_visualization -->|"draws movement"| node_movement
node_visualization -->|"plots landscape"| node_rastrigin
node_optimizer -->|"updates population"| node_operators
node_optimizer -->|"builds run result"| node_result
node_optimizer -->|"uses settings"| node_config
node_optimizer -.->|"evaluates objective"| node_rastrigin
node_optimizer -.->|"evaluates objective"| node_pump
node_parameters -->|"creates settings"| node_config
node_parameters -->|"selects objective"| node_rastrigin
node_loader -->|"reads scenarios"| node_pump_data
node_loader -->|"reads example"| node_reference_data
node_loader -->|"constructs scenarios"| node_pump
node_book_panel -->|"shows verification"| node_book_replay
node_book_replay -->|"replays equations"| node_operators
node_book_replay -->|"loads reference"| node_loader
node_book_replay -->|"checks fitness"| node_rastrigin
node_notebooks -->|"runs experiments"| node_runner
node_runner -->|"runs EHO"| node_optimizer
node_runner -.->|"summarizes runs"| node_statistics
node_runner -.->|"plots outcomes"| node_plotting
node_runner -.->|"saves outputs"| node_artifacts
node_artifacts -->|"uses scenario data"| node_loader
node_plotting -->|"plots objective"| node_rastrigin

click node_launcher "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/main.py"
click node_window "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/main_window.py"
click node_parameters "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/parameter_panel.py"
click node_worker "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/worker.py"
click node_visualization "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/visualization_panel.py"
click node_movement "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/movement_plot.py"
click node_results "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/results_panel.py"
click node_book_panel "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/book_example_panel.py"
click node_optimizer "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/optimizer.py"
click node_config "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/config.py"
click node_operators "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/operators.py"
click node_result "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/result.py"
click node_rastrigin "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/rastrigin.py"
click node_pump "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/pump_allocation.py"
click node_loader "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/data_loader.py"
click node_book_replay "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/book_replay.py"
click node_reference_data "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/data/reference/rastrigin_book_example.json"
click node_pump_data "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/data/pump_scenarios.csv"
click node_runner "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/runner.py"
click node_statistics "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/statistics.py"
click node_plotting "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/plotting.py"
click node_artifacts "https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/artifacts.py"
click node_notebooks "https://github.com/datweb07/elephant-herding-optimization-seminar/tree/main/Experiment"

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_launcher,node_window,node_parameters,node_worker,node_visualization,node_movement,node_results,node_book_panel,node_user toneBlue
class node_optimizer,node_config,node_operators,node_result toneAmber
class node_rastrigin,node_pump,node_loader,node_book_replay,node_reference_data,node_pump_data toneMint
class node_runner,node_statistics,node_plotting,node_artifacts,node_notebooks toneRose
```

## Components

### Interactive demo

- [App launcher](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/main.py): `main.py`
- [Main window](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/main_window.py): `src/gui/main_window.py`
- [Run parameters](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/parameter_panel.py): `src/gui/parameter_panel.py`
- [Background worker](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/worker.py): `src/gui/worker.py`
- [Visualization inspector](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/visualization_panel.py): `src/gui/visualization_panel.py`
- [Movement plots](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/movement_plot.py): `src/gui/movement_plot.py`
- [Results export](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/results_panel.py): `src/gui/results_panel.py`
- [Book example panel](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/gui/book_example_panel.py): `src/gui/book_example_panel.py`

### EHO engine

- [EHO optimizer](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/optimizer.py): `src/eho/optimizer.py`
- [Run configuration](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/config.py): `src/eho/config.py`
- [EHO operators](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/operators.py): `src/eho/operators.py`
- [Run history and result](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/eho/result.py): `src/eho/result.py`

### Objectives and replay

- [Rastrigin objective](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/rastrigin.py): `src/objectives/rastrigin.py`
- [Pump allocation objective](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/pump_allocation.py): `src/objectives/pump_allocation.py`
- [Scenario and reference loader](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/data_loader.py): `src/objectives/data_loader.py`
- [Book replay verifier](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/objectives/book_replay.py): `src/objectives/book_replay.py`
- [Book reference data](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/data/reference/rastrigin_book_example.json): `data/reference/rastrigin_book_example.json`
- [Pump scenarios](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/data/pump_scenarios.csv): `data/pump_scenarios.csv`

### Experiment analysis

- [Experiment runner](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/runner.py): `src/experiment_helpers/runner.py`
- [Experiment statistics](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/statistics.py): `src/experiment_helpers/statistics.py`
- [Experiment plotting](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/plotting.py): `src/experiment_helpers/plotting.py`
- [Experiment artifacts](https://github.com/datweb07/elephant-herding-optimization-seminar/blob/main/src/experiment_helpers/artifacts.py): `src/experiment_helpers/artifacts.py`
- [Experiment notebooks](https://github.com/datweb07/elephant-herding-optimization-seminar/tree/main/Experiment): `Experiment`

### Other components

- **Seminar user**

## Connections

- Seminar user → App launcher: launches (evidence: `README.md`)
- App launcher → Main window: opens (evidence: `main.py`)
- Seminar user → Main window: configures and starts (evidence: `README.md`)
- Main window → Run parameters: reads settings (evidence: `src/gui/main_window.py`)
- Main window → Scenario and reference loader: loads scenarios (evidence: `src/gui/main_window.py`)
- Main window → Background worker: starts run (evidence: `src/gui/main_window.py`)
- Main window → Visualization inspector: updates progress (evidence: `src/gui/main_window.py`)
- Main window → Results export: presents results (evidence: `src/gui/main_window.py`)
- Main window → Book example panel: shows replay (evidence: `src/gui/main_window.py`)
- Background worker → EHO optimizer: runs (evidence: `src/gui/worker.py`)
- Background worker → Main window: emits progress and result (evidence: `src/gui/worker.py`)
- Visualization inspector → Movement plots: draws movement (evidence: `src/gui/visualization_panel.py`)
- Visualization inspector → Rastrigin objective: plots landscape (evidence: `src/gui/visualization_panel.py`)
- EHO optimizer → EHO operators: updates population (evidence: `src/eho/optimizer.py`)
- EHO optimizer → Run history and result: builds run result (evidence: `src/eho/optimizer.py`)
- EHO optimizer → Run configuration: uses settings (evidence: `src/eho/optimizer.py`)
- EHO optimizer → Rastrigin objective: evaluates objective
- EHO optimizer → Pump allocation objective: evaluates objective
- Run parameters → Run configuration: creates settings (evidence: `src/gui/parameter_panel.py`)
- Run parameters → Rastrigin objective: selects objective (evidence: `src/gui/parameter_panel.py`)
- Scenario and reference loader → Pump scenarios: reads scenarios (evidence: `src/objectives/data_loader.py`)
- Scenario and reference loader → Book reference data: reads example (evidence: `src/objectives/data_loader.py`)
- Scenario and reference loader → Pump allocation objective: constructs scenarios (evidence: `src/objectives/data_loader.py`)
- Book example panel → Book replay verifier: shows verification (evidence: `src/gui/book_example_panel.py`)
- Book replay verifier → EHO operators: replays equations (evidence: `src/objectives/book_replay.py`)
- Book replay verifier → Scenario and reference loader: loads reference (evidence: `src/objectives/book_replay.py`)
- Book replay verifier → Rastrigin objective: checks fitness (evidence: `src/objectives/book_replay.py`)
- Experiment notebooks → Experiment runner: runs experiments (evidence: `README.md`)
- Experiment runner → EHO optimizer: runs EHO (evidence: `src/experiment_helpers/runner.py`)
- Experiment runner → Experiment statistics: summarizes runs
- Experiment runner → Experiment plotting: plots outcomes
- Experiment runner → Experiment artifacts: saves outputs
- Experiment artifacts → Scenario and reference loader: uses scenario data (evidence: `src/experiment_helpers/artifacts.py`)
- Experiment plotting → Rastrigin objective: plots objective (evidence: `src/experiment_helpers/plotting.py`)
