# teniapc07-debug/pso-rna-suite architecture

> Architecture diagram of the GitHub repository teniapc07-debug/pso-rna-suite, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/teniapc07-debug/pso-rna-suite
- Repository: https://github.com/teniapc07-debug/pso-rna-suite

## Overview

Suite PSO + RNA is a desktop application with two coordinated workflows: users configure and run particle-swarm optimization against either a validated symbolic objective or an RNA model, and can separately build, train, validate, and export an RNA. The shared in-memory state enables a trained model to be used by PSO without restarting. The graph preserves these documented capabilities and the central persistence and model-discovery services. Some runner internals were only partly excerpted, so unsupported links are omitted or marked unverified.

Main entry points: [`logica/pso_runner.py`](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/pso_runner.py) (PSO workflow), [`logica/rna_runner.py`](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/rna_runner.py) (RNA workflow), [`app.py`](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/app.py) (Window and dispatch), [`logica/rutas.py`](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/rutas.py) (Data paths)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_app["Window and dispatch<br/>[app.py]"]
  node_pso_ui["PSO controls<br/>[ui_pso.py]"]
  node_rna_ui["RNA controls<br/>[ui_rna.py]"]
  node_results_ui["Results view<br/>[ui_resultados.py]"]
  node_state["Shared session state<br/>[estado.py]"]
end

subgraph group_pso["PSO optimization"]
  node_pso_runner["PSO workflow<br/>[pso_runner.py]"]
  node_objective["Objective parser"]
  node_swarm["Swarm optimizer<br/>[Enjambre_M.py]"]
  node_particle["Particle dynamics<br/>[Particula_M.py]"]
end

subgraph group_rna["RNA modeling"]
  node_rna_runner["RNA workflow<br/>[rna_runner.py]"]
  node_hybrid["RNA model adapter<br/>[Hibrido.py]"]
  node_tutor["RNA tutor"]
end

subgraph group_services["Shared services"]
  node_model_search["Model discovery"]
  node_history["Run history<br/>[historial.py]"]
  node_table_io["Table I/O<br/>[io_tablas.py]"]
  node_paths["Data paths<br/>[rutas.py]"]
  node_logging["Logging<br/>[logging_config.py]"]
  node_data_files[("Local data files")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"builds controls"| node_pso_ui
node_app -->|"builds controls"| node_rna_ui
node_app -->|"builds view"| node_results_ui
node_app -->|"dispatches PSO"| node_pso_runner
node_app -->|"dispatches RNA"| node_rna_runner
node_app -->|"reads shared state"| node_state
node_pso_runner -->|"updates state"| node_state
node_rna_runner -->|"updates state"| node_state
node_pso_runner -->|"uses objective"| node_objective
node_pso_runner -->|"runs swarm"| node_swarm
node_swarm -->|"creates particles"| node_particle
node_pso_runner -->|"loads RNA model"| node_hybrid
node_pso_runner -->|"resolves models"| node_model_search
node_rna_runner -->|"reads tables"| node_table_io
node_rna_runner -->|"uses objective"| node_objective
node_pso_runner -->|"records runs"| node_history
node_pso_runner -->|"writes tables"| node_table_io
node_rna_runner -->|"uses data paths"| node_paths
node_pso_runner -->|"uses data paths"| node_paths
node_history -->|"gets file paths"| node_paths
node_model_search -->|"gets file paths"| node_paths
node_app -->|"configures logging"| node_logging
node_pso_runner -->|"logs operations"| node_logging
node_rna_runner -->|"logs operations"| node_logging
node_history -->|"persists history"| node_data_files
node_table_io -->|"reads and writes"| node_data_files
node_pso_runner -.->|"refreshes results"| node_results_ui
node_rna_runner -.->|"trains model"| node_tutor
node_rna_runner -.->|"exports model"| node_hybrid
node_rna_runner -.->|"model reuse"| node_pso_runner

click node_app "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/app.py"
click node_pso_ui "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/ui/ui_pso.py"
click node_rna_ui "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/ui/ui_rna.py"
click node_results_ui "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/ui/ui_resultados.py"
click node_state "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/estado.py"
click node_pso_runner "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/pso_runner.py"
click node_objective "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/PSO_MV/funcion_objetivo.py"
click node_swarm "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/PSO_MV/Enjambre_M.py"
click node_particle "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/PSO_MV/Particula_M.py"
click node_rna_runner "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/rna_runner.py"
click node_hybrid "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/RNA/Hibrido.py"
click node_tutor "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/RNA/RedNeuronal_Tutor.py"
click node_model_search "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/buscador_modelos.py"
click node_history "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/historial.py"
click node_table_io "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/io_tablas.py"
click node_paths "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/rutas.py"
click node_logging "https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/logging_config.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_app,node_pso_ui,node_rna_ui,node_results_ui,node_state,node_user toneBlue
class node_pso_runner,node_objective,node_swarm,node_particle toneAmber
class node_rna_runner,node_hybrid,node_tutor toneMint
class node_model_search,node_history,node_table_io,node_paths,node_logging,node_data_files toneRose
```

## Components

### Desktop app

- [Window and dispatch](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/app.py): `app.py`
- [PSO controls](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/ui/ui_pso.py): `ui/ui_pso.py`
- [RNA controls](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/ui/ui_rna.py): `ui/ui_rna.py`
- [Results view](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/ui/ui_resultados.py): `ui/ui_resultados.py`
- [Shared session state](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/estado.py): `estado.py`

### PSO optimization

- [PSO workflow](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/pso_runner.py): `logica/pso_runner.py`
- [Objective parser](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/PSO_MV/funcion_objetivo.py): `PSO_MV/funcion_objetivo.py`
- [Swarm optimizer](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/PSO_MV/Enjambre_M.py): `PSO_MV/Enjambre_M.py`
- [Particle dynamics](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/PSO_MV/Particula_M.py): `PSO_MV/Particula_M.py`

### RNA modeling

- [RNA workflow](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/rna_runner.py): `logica/rna_runner.py`
- [RNA model adapter](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/RNA/Hibrido.py): `RNA/Hibrido.py`
- [RNA tutor](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/RNA/RedNeuronal_Tutor.py): `RNA/RedNeuronal_Tutor.py`

### Shared services

- [Model discovery](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/buscador_modelos.py): `logica/buscador_modelos.py`
- [Run history](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/historial.py): `logica/historial.py`
- [Table I/O](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/io_tablas.py): `logica/io_tablas.py`
- [Data paths](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/rutas.py): `logica/rutas.py`
- [Logging](https://github.com/teniapc07-debug/pso-rna-suite/blob/main/logica/logging_config.py): `logica/logging_config.py`
- **Local data files**

### Other components

- **User**

## Connections

- User → Window and dispatch: uses (evidence: `README.md`)
- Window and dispatch → PSO controls: builds controls (evidence: `app.py`)
- Window and dispatch → RNA controls: builds controls (evidence: `app.py`)
- Window and dispatch → Results view: builds view (evidence: `app.py`)
- Window and dispatch → PSO workflow: dispatches PSO (evidence: `app.py`)
- Window and dispatch → RNA workflow: dispatches RNA (evidence: `app.py`)
- Window and dispatch → Shared session state: reads shared state (evidence: `app.py`)
- PSO workflow → Shared session state: updates state (evidence: `logica/pso_runner.py`)
- RNA workflow → Shared session state: updates state (evidence: `logica/rna_runner.py`)
- PSO workflow → Objective parser: uses objective (evidence: `logica/pso_runner.py`)
- PSO workflow → Swarm optimizer: runs swarm (evidence: `logica/pso_runner.py`)
- Swarm optimizer → Particle dynamics: creates particles (evidence: `PSO_MV/Enjambre_M.py`)
- PSO workflow → RNA model adapter: loads RNA model (evidence: `logica/pso_runner.py`)
- PSO workflow → Model discovery: resolves models (evidence: `logica/pso_runner.py`)
- RNA workflow → Table I/O: reads tables (evidence: `logica/rna_runner.py`)
- RNA workflow → Objective parser: uses objective (evidence: `logica/rna_runner.py`)
- PSO workflow → Run history: records runs (evidence: `logica/pso_runner.py`)
- PSO workflow → Table I/O: writes tables (evidence: `logica/pso_runner.py`)
- RNA workflow → Data paths: uses data paths (evidence: `logica/rna_runner.py`)
- PSO workflow → Data paths: uses data paths (evidence: `logica/pso_runner.py`)
- Run history → Data paths: gets file paths (evidence: `logica/historial.py`)
- Model discovery → Data paths: gets file paths (evidence: `logica/buscador_modelos.py`)
- Window and dispatch → Logging: configures logging (evidence: `app.py`)
- PSO workflow → Logging: logs operations (evidence: `logica/pso_runner.py`)
- RNA workflow → Logging: logs operations (evidence: `logica/rna_runner.py`)
- Run history → Local data files: persists history (evidence: `logica/historial.py`)
- Table I/O → Local data files: reads and writes (evidence: `logica/io_tablas.py`)
- PSO workflow → Results view: refreshes results
- RNA workflow → RNA tutor: trains model
- RNA workflow → RNA model adapter: exports model
- RNA workflow → PSO workflow: model reuse (evidence: `README.md`)
