# jvianna07/dea-solver architecture

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

- Interactive diagram: https://gitdiagram.com/jvianna07/dea-solver
- Repository: https://github.com/jvianna07/dea-solver

## Overview

DEA-Solver is a small Python library for evaluating decision-making units (DMUs). The user supplies a pandas DataFrame and selects input and output columns; the DEA object extracts those values, and DEA_CCR.solve optionally normalizes them before solving one linear program per DMU with SciPy. DEA_CCR.rank calls solve and joins the resulting reciprocal scores to the original data, optionally sorting them. Input/output inspection methods expose the selected columns. DEA_BCC exists as an unimplemented placeholder. The runtime relationships shown are supported by dea/solver.py; no separate storage or external service is evident.

Main entry points: [`dea/solver.py`](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py) (CCR Solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_analyst(("Analyst"))
node_dataframe["Input DataFrame"]
node_data_selection["Data Selection<br/>[solver.py]"]
node_input_output_views["Input Output Views<br/>[solver.py]"]
node_normalization["Normalization<br/>[solver.py]"]
node_ccr_solver["CCR Solver<br/>[solver.py]"]
node_linear_programming["Linear Programming"]
node_score_results["Score Results<br/>[solver.py]"]
node_ranking["Ranking<br/>[solver.py]"]
node_ranked_results["Ranked Results<br/>[solver.py]"]
node_bcc_placeholder["BCC Placeholder<br/>[solver.py]"]

node_analyst -->|"creates DEA"| node_data_selection
node_dataframe -->|"provides data"| node_data_selection
node_data_selection -->|"exposes columns"| node_input_output_views
node_analyst -->|"requests views"| node_input_output_views
node_analyst -->|"calls solve"| node_ccr_solver
node_ccr_solver -->|"calls when enabled"| node_normalization
node_normalization -->|"returns arrays"| node_ccr_solver
node_ccr_solver -->|"calls linprog"| node_linear_programming
node_ccr_solver -->|"returns scores"| node_score_results
node_analyst -->|"calls rank"| node_ranking
node_ranking -->|"calls solve"| node_ccr_solver
node_ranking -->|"joins and sorts"| node_ranked_results
node_analyst -->|"can instantiate"| node_bcc_placeholder

click node_data_selection "https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py"
click node_input_output_views "https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py"
click node_normalization "https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py"
click node_ccr_solver "https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py"
click node_score_results "https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py"
click node_ranking "https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py"
click node_ranked_results "https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py"
click node_bcc_placeholder "https://github.com/jvianna07/dea-solver/blob/main/dea/solver.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_analyst,node_dataframe,node_linear_programming toneIndigo
class node_data_selection,node_normalization,node_ccr_solver,node_score_results,node_ranking,node_ranked_results,node_bcc_placeholder toneTeal
class node_input_output_views toneBlue
```

## Components

### Other components

- **Analyst**
- **Input DataFrame**
- [Data Selection](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py): `dea/solver.py`
- [Input Output Views](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py): `dea/solver.py`
- [Normalization](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py): `dea/solver.py`
- [CCR Solver](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py): `dea/solver.py`
- **Linear Programming**
- [Score Results](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py): `dea/solver.py`
- [Ranking](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py): `dea/solver.py`
- [Ranked Results](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py): `dea/solver.py`
- [BCC Placeholder](https://github.com/jvianna07/dea-solver/blob/main/dea/solver.py): `dea/solver.py`

## Connections

- Analyst → Data Selection: creates DEA (evidence: `dea/solver.py`)
- Input DataFrame → Data Selection: provides data (evidence: `dea/solver.py`)
- Data Selection → Input Output Views: exposes columns (evidence: `dea/solver.py`)
- Analyst → Input Output Views: requests views (evidence: `dea/solver.py`)
- Analyst → CCR Solver: calls solve (evidence: `dea/solver.py`)
- CCR Solver → Normalization: calls when enabled (evidence: `dea/solver.py`)
- Normalization → CCR Solver: returns arrays (evidence: `dea/solver.py`)
- CCR Solver → Linear Programming: calls linprog (evidence: `dea/solver.py`)
- CCR Solver → Score Results: returns scores (evidence: `dea/solver.py`)
- Analyst → Ranking: calls rank (evidence: `dea/solver.py`)
- Ranking → CCR Solver: calls solve (evidence: `dea/solver.py`)
- Ranking → Ranked Results: joins and sorts (evidence: `dea/solver.py`)
- Analyst → BCC Placeholder: can instantiate (evidence: `dea/solver.py`)
