# nitish-singh123/team-allocation-and-guide architecture

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

- Interactive diagram: https://gitdiagram.com/nitish-singh123/team-allocation-and-guide
- Repository: https://github.com/nitish-singh123/team-allocation-and-guide

## Overview

This repository contains two standalone, effectively identical command-line programs for assigning teams to guides. The user enters teams, guide capacities, and preferences; each program computes a maximum-flow allocation and a greedy comparison, then prints assignments, guide loads, and unassigned teams. The two files implement the workflow independently rather than importing one another. The graph separates input/output, allocation strategies, and the flow engine; both algorithms are implemented in the same file as their entry point.

Main entry points: [`main.py`](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py) (CLI (main)), [`8_hr_version.py`](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.py) (CLI (8-hour))

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_main_cli["CLI &#40;main&#41;<br/>[main.py]"]
node_main_max["Max-flow allocation<br/>[main.py]"]
node_main_greedy["Greedy allocation<br/>[main.py]"]
node_main_dinic["Dinic engine<br/>[main.py]"]
node_legacy_cli["CLI &#40;8-hour&#41;<br/>[8_hr_version.py]"]
node_legacy_max["Max-flow allocation<br/>[8_hr_version.py]"]
node_legacy_greedy["Greedy allocation<br/>[8_hr_version.py]"]
node_legacy_dinic["Dinic engine<br/>[8_hr_version.py]"]

node_user -->|"enters data"| node_main_cli
node_main_cli -->|"calls"| node_main_max
node_main_max -->|"computes flow"| node_main_dinic
node_main_cli -->|"calls"| node_main_greedy
node_main_cli -->|"prints reports"| node_user
node_user -->|"enters data"| node_legacy_cli
node_legacy_cli -->|"calls"| node_legacy_max
node_legacy_max -->|"computes flow"| node_legacy_dinic
node_legacy_cli -->|"calls"| node_legacy_greedy
node_legacy_cli -->|"prints reports"| node_user

click node_main_cli "https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py"
click node_main_max "https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py"
click node_main_greedy "https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py"
click node_main_dinic "https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py"
click node_legacy_cli "https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.py"
click node_legacy_max "https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.py"
click node_legacy_greedy "https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.py"
click node_legacy_dinic "https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.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_user toneBlue
class node_main_cli,node_main_max,node_main_greedy,node_main_dinic,node_legacy_cli,node_legacy_max,node_legacy_greedy,node_legacy_dinic toneTeal
```

## Components

### Other components

- **User**
- [CLI (main)](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py): `main.py`
- [Max-flow allocation](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py): `main.py`
- [Greedy allocation](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py): `main.py`
- [Dinic engine](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/main.py): `main.py`
- [CLI (8-hour)](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.py): `8_hr_version.py`
- [Max-flow allocation](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.py): `8_hr_version.py`
- [Greedy allocation](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.py): `8_hr_version.py`
- [Dinic engine](https://github.com/nitish-singh123/team-allocation-and-guide/blob/master/8_hr_version.py): `8_hr_version.py`

## Connections

- User → CLI (main): enters data (evidence: `main.py`)
- CLI (main) → Max-flow allocation: calls (evidence: `main.py`)
- Max-flow allocation → Dinic engine: computes flow (evidence: `main.py`)
- CLI (main) → Greedy allocation: calls (evidence: `main.py`)
- CLI (main) → User: prints reports (evidence: `main.py`)
- User → CLI (8-hour): enters data (evidence: `8_hr_version.py`)
- CLI (8-hour) → Max-flow allocation: calls (evidence: `8_hr_version.py`)
- Max-flow allocation → Dinic engine: computes flow (evidence: `8_hr_version.py`)
- CLI (8-hour) → Greedy allocation: calls (evidence: `8_hr_version.py`)
- CLI (8-hour) → User: prints reports (evidence: `8_hr_version.py`)
