# swapnilvermani/optimisation architecture

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

- Interactive diagram: https://gitdiagram.com/swapnilvermani/optimisation
- Repository: https://github.com/swapnilvermani/optimisation

## Overview

#### Purpose
This repository contains GAMS optimization models for a three-year manufacturing manpower-planning problem. The models choose recruitment, retraining, redundancy, and short-time working policies to transition workforce categories toward projected requirements while balancing cost and workforce objectives.

#### Entry Points and Model Variants
The executable model sources are:
- `ProjectQ1.gms`
- `ProjectQ2.gms`
- `ProjectQ6.gms`

Each is a standalone GAMS entry point, likely representing successive assignment questions or alternative formulations of the planning problem. Running a `.gms` file produces the associated solver listing/output artifacts.

#### Workforce Planning Optimization Core
The core decision domain is workforce movement among unskilled, semi-skilled, and skilled categories over three planning years. Model decisions represent:
- hiring into workforce categories,
- retraining between categories,
- redundancy reductions,
- short-term-working adjustments.

The governing mathematical formulation is contained in the `.gms` files, especially `ProjectQ1.gms`, `ProjectQ2.gms`, and `ProjectQ6.gms`. These encode sets, parameters, variables, constraints, and objective functions in GAMS.

#### Planning Flow and Boundaries
The expected control flow is:
1. Load workforce assumptions and requirements embedded in a GAMS source model.
2. Define workforce balance constraints across years and skill categories.
3. Apply policy constraints for recruitment, retraining, redundancy, and short-time work.
4. Optimize the chosen objective through a GAMS-supported solver.
5. Inspect solver and result output.

The principal boundary is between model formulation (`.gms`) and generated execution diagnostics/results (`.lst`, `.lxi`).

#### Solver Outputs and Diagnostics
Each model has committed run artifacts:
- `ProjectQ1.lst`, `ProjectQ2.lst`, `ProjectQ6.lst`
- `ProjectQ1.lxi`, `ProjectQ2.lxi`, `ProjectQ6.lxi`

`.lst` files are GAMS listing files that capture compilation, solve status, equation/variable levels, and reports. `.lxi` files are GAMS execution/index artifacts associated with these runs. They allow review of existing results without rerunning the model.

#### Supporting Analysis Materials
`OptGraphs.xlsx` is the spreadsheet-based visualization or analysis layer for optimization results. `OptimisationProjectReport.pdf` documents the project’s interpretation, formulation, and/or recommendations. These files consume or communicate model outcomes but are not runtime dependencies of the GAMS models.

#### Runtime and External Dependencies
The required runtime is GAMS, including an available optimization solver compatible with the model types defined in the `.gms` sources. No application service, database, API, or web infrastructure is present in the repository.

Main entry points: [`ProjectQ1.gms`](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ1.gms) (Project Q1 model), [`ProjectQ2.gms`](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ2.gms) (Project Q2 model), [`ProjectQ6.gms`](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ6.gms) (Project Q6 model), [`ProjectQ1.lst`](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ1.lst) (Q1 solver listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_models["GAMS model variants"]
  node_q1["Project Q1 model<br/>GAMS entry point<br/>[ProjectQ1.gms]"]
  node_q2["Project Q2 model<br/>GAMS entry point<br/>[ProjectQ2.gms]"]
  node_q6["Project Q6 model<br/>GAMS entry point<br/>[ProjectQ6.gms]"]
  node_assumptions["Embedded workforce data<br/>model parameters"]
  node_workforce_balance["Workforce balance<br/>constraints"]
  node_policy_decisions["Policy decisions<br/>decision variables"]
  node_objective["Cost and workforce objective<br/>optimization objective"]
end

subgraph group_artifacts["Run artifacts"]
  node_q1_listing["Q1 solver listing<br/>GAMS listing<br/>[ProjectQ1.lst]"]
  node_q2_listing["Q2 solver listing<br/>GAMS listing<br/>[ProjectQ2.lst]"]
  node_q6_listing["Q6 solver listing<br/>GAMS listing<br/>[ProjectQ6.lst]"]
  node_execution_indexes["Execution indexes<br/>GAMS run artifacts"]
end

subgraph group_analysis["Analysis materials"]
  node_graphs["Optimization graphs<br/>spreadsheet analysis<br/>[OptGraphs.xlsx]"]
  node_report["Project report<br/>project documentation"]
end

node_gams{{"GAMS runtime and solver"}}

node_assumptions -->|"sets requirements"| node_workforce_balance
node_policy_decisions -->|"changes workforce"| node_workforce_balance
node_workforce_balance -->|"constrains"| node_objective
node_policy_decisions -->|"drives cost"| node_objective
node_q1 -->|"defines"| node_assumptions
node_q1 -->|"defines"| node_policy_decisions
node_q1 -->|"formulates"| node_objective
node_q2 -->|"defines"| node_assumptions
node_q2 -->|"defines"| node_policy_decisions
node_q2 -->|"formulates"| node_objective
node_q6 -->|"defines"| node_assumptions
node_q6 -->|"defines"| node_policy_decisions
node_q6 -->|"formulates"| node_objective
node_gams -->|"runs"| node_q1
node_gams -->|"runs"| node_q2
node_gams -->|"runs"| node_q6
node_q1 -->|"produces"| node_q1_listing
node_q2 -->|"produces"| node_q2_listing
node_q6 -->|"produces"| node_q6_listing
node_q1 -->|"produces .lxi"| node_execution_indexes
node_q2 -->|"produces .lxi"| node_execution_indexes
node_q6 -->|"produces .lxi"| node_execution_indexes
node_q1_listing -.->|"analyzed in"| node_graphs
node_q2_listing -.->|"analyzed in"| node_graphs
node_q6_listing -.->|"documents results"| node_report

click node_q1 "https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ1.gms"
click node_q2 "https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ2.gms"
click node_q6 "https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ6.gms"
click node_q1_listing "https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ1.lst"
click node_q2_listing "https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ2.lst"
click node_q6_listing "https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ6.lst"
click node_graphs "https://github.com/swapnilvermani/optimisation/blob/master/OptGraphs.xlsx"
click node_report "https://github.com/swapnilvermani/optimisation/blob/master/OptimisationProjectReport.pdf"

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_q1,node_q2,node_q6,node_assumptions,node_workforce_balance,node_policy_decisions,node_objective toneBlue
class node_q1_listing,node_q2_listing,node_q6_listing,node_execution_indexes toneAmber
class node_graphs,node_report toneMint
class node_gams toneNeutral
```

## Components

### GAMS model variants

Standalone three-year workforce-planning formulations.

- [Project Q1 model](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ1.gms): GAMS entry point · `ProjectQ1.gms`
- [Project Q2 model](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ2.gms): GAMS entry point · `ProjectQ2.gms`
- [Project Q6 model](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ6.gms): GAMS entry point · `ProjectQ6.gms`
- **Embedded workforce data**: model parameters · Initial workforce and projected requirements are defined in the GAMS sources.
- **Workforce balance**: constraints · Tracks unskilled, semi-skilled, and skilled workforce across three years.
- **Policy decisions**: decision variables · Recruitment, retraining, redundancy, and short-time working choices.
- **Cost and workforce objective**: optimization objective

### Run artifacts

Committed solver diagnostics and execution indexes.

- [Q1 solver listing](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ1.lst): GAMS listing · `ProjectQ1.lst`
- [Q2 solver listing](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ2.lst): GAMS listing · `ProjectQ2.lst`
- [Q6 solver listing](https://github.com/swapnilvermani/optimisation/blob/master/ProjectQ6.lst): GAMS listing · `ProjectQ6.lst`
- **Execution indexes**: GAMS run artifacts · Per-model .lxi artifacts accompany existing runs.

### Analysis materials

Documents and visualizes optimization outcomes.

- [Optimization graphs](https://github.com/swapnilvermani/optimisation/blob/master/OptGraphs.xlsx): spreadsheet analysis · `OptGraphs.xlsx`
- [Project report](https://github.com/swapnilvermani/optimisation/blob/master/OptimisationProjectReport.pdf): project documentation · `OptimisationProjectReport.pdf`

### Other components

- **GAMS runtime and solver**: runtime · Compiles and solves each standalone model.

## Connections

- Embedded workforce data → Workforce balance: sets requirements
- Policy decisions → Workforce balance: changes workforce
- Workforce balance → Cost and workforce objective: constrains
- Policy decisions → Cost and workforce objective: drives cost
- Project Q1 model → Embedded workforce data: defines
- Project Q1 model → Policy decisions: defines
- Project Q1 model → Cost and workforce objective: formulates
- Project Q2 model → Embedded workforce data: defines
- Project Q2 model → Policy decisions: defines
- Project Q2 model → Cost and workforce objective: formulates
- Project Q6 model → Embedded workforce data: defines
- Project Q6 model → Policy decisions: defines
- Project Q6 model → Cost and workforce objective: formulates
- GAMS runtime and solver → Project Q1 model: runs
- GAMS runtime and solver → Project Q2 model: runs
- GAMS runtime and solver → Project Q6 model: runs
- Project Q1 model → Q1 solver listing: produces
- Project Q2 model → Q2 solver listing: produces
- Project Q6 model → Q6 solver listing: produces
- Project Q1 model → Execution indexes: produces .lxi
- Project Q2 model → Execution indexes: produces .lxi
- Project Q6 model → Execution indexes: produces .lxi
- Q1 solver listing → Optimization graphs: analyzed in
- Q2 solver listing → Optimization graphs: analyzed in
- Q6 solver listing → Project report: documents results
