# kiruban-raj/robot-work-allocation-system architecture

> Architecture diagram of the GitHub repository kiruban-raj/robot-work-allocation-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kiruban-raj/robot-work-allocation-system
- Repository: https://github.com/kiruban-raj/robot-work-allocation-system

## Overview

The product is a terminal robot-allocation application. A user supplies active and optional standby inventory plus one or more work-hour requests; the CLI selects a strategy, produces allocations, and can report multi-client utilization. The shared bounded-knapsack solver underpins the single-request strategies and standby top-up, while multi-client allocation dispatches requests in priority order and continues after individual failures. The graph follows documented capabilities where CLI excerpts are incomplete; uncertain internal calls are omitted.

Main entry points: [`robot_allocation/cli.py`](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/cli.py) (CLI workflow), [`robot_allocation/standby.py`](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/standby.py) (Standby top-up), [`robot_allocation/strategies.py`](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/strategies.py) (Levels 1 and 2), [`robot_allocation/solver.py`](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/solver.py) (Cover solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Terminal interface"]
  node_main["Program entry<br/>[main.py]"]
  node_cli["CLI workflow<br/>[cli.py]"]
end

subgraph group_allocation["Allocation strategies"]
  node_strategies["Levels 1 and 2<br/>[strategies.py]"]
  node_standby["Standby top-up<br/>[standby.py]"]
end

subgraph group_batch["Batch and reporting"]
  node_multiclient["Level 4 batch<br/>[multiclient.py]"]
  node_summary["Utilization summary<br/>[summary.py]"]
end

subgraph group_engine["Shared engine"]
  node_domain["Allocation domain<br/>[domain.py]"]
  node_errors["User errors<br/>[errors.py]"]
  node_solver["Cover solver<br/>[solver.py]"]
end

node_user(("Operator"))

node_user -->|"runs"| node_main
node_main -->|"starts"| node_cli
node_cli -->|"allocates"| node_strategies
node_cli -->|"requests top-up"| node_standby
node_cli -->|"dispatches batch"| node_multiclient
node_cli -->|"builds report"| node_summary
node_strategies -->|"searches cover"| node_solver
node_standby -->|"uses active strategy"| node_strategies
node_standby -->|"covers deficit"| node_solver
node_multiclient -->|"allocates each request"| node_standby
node_solver -->|"reads inventory"| node_domain
node_summary -->|"reads allocations"| node_domain
node_cli -->|"handles failures"| node_errors

click node_main "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/main.py"
click node_cli "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/cli.py"
click node_domain "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/domain.py"
click node_errors "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/errors.py"
click node_solver "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/solver.py"
click node_strategies "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/strategies.py"
click node_standby "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/standby.py"
click node_multiclient "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/multiclient.py"
click node_summary "https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/summary.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_main,node_cli toneBlue
class node_strategies,node_standby toneAmber
class node_multiclient,node_summary toneMint
class node_domain,node_errors,node_solver toneRose
class node_user toneIndigo
```

## Components

### Terminal interface

- [Program entry](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/main.py): `main.py`
- [CLI workflow](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/cli.py): `robot_allocation/cli.py`

### Allocation strategies

- [Levels 1 and 2](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/strategies.py): `robot_allocation/strategies.py`
- [Standby top-up](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/standby.py): `robot_allocation/standby.py`

### Batch and reporting

- [Level 4 batch](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/multiclient.py): `robot_allocation/multiclient.py`
- [Utilization summary](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/summary.py): `robot_allocation/summary.py`

### Shared engine

- [Allocation domain](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/domain.py): `robot_allocation/domain.py`
- [User errors](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/errors.py): `robot_allocation/errors.py`
- [Cover solver](https://github.com/kiruban-raj/robot-work-allocation-system/blob/master/robot_allocation/solver.py): `robot_allocation/solver.py`

### Other components

- **Operator**

## Connections

- Operator → Program entry: runs
- Program entry → CLI workflow: starts
- CLI workflow → Levels 1 and 2: allocates
- CLI workflow → Standby top-up: requests top-up
- CLI workflow → Level 4 batch: dispatches batch
- CLI workflow → Utilization summary: builds report
- Levels 1 and 2 → Cover solver: searches cover
- Standby top-up → Levels 1 and 2: uses active strategy
- Standby top-up → Cover solver: covers deficit
- Level 4 batch → Standby top-up: allocates each request
- Cover solver → Allocation domain: reads inventory
- Utilization summary → Allocation domain: reads allocations
- CLI workflow → User errors: handles failures
