Operations Research Project
Choose the convenient tab to solve a problem
🎓 GL3 - 2025 - Operational Research Project
This application demonstrates how Linear Programming (PL) and Mixed-Integer Linear Programming (PLNE) can be applied to solve real-world optimisation problems using Gurobi.
🧾 Compte Rendu
🍎 Diet Problem
Find the optimal diet that minimizes cost while meeting nutritional requirements.
🧮 Mathematical Formulation
Parameters
| Symbol | Description |
|---|---|
| $$I$$ | Set of available foods |
| $$J$$ | Set of nutrients |
| $$c_i$$ | Cost per unit of food i |
| $$n_{ij}$$ | Amount of nutrient j in one unit of food i |
| $$R_j$$ | Minimum requirement for nutrient j |
Decision Variables
| Symbol | Description |
|---|---|
| $$x_i$$ | Units of food i to consume |
Objective Function:
$$
\text{Minimize} \quad Z = \sum_{i \in I} c_i \cdot x_i
$$
Constraints:
Nutritional requirements: $$\sum_{i \in I} n_{ij} \cdot x_i \geq R_j \quad \forall j \in J$$
Non-negativity: $$x_i \geq 0 \quad \forall i \in I$$
🍎 Foods Data
Add foods with their costs and nutritional content per unit:
Foods and Nutritional Content
Food A | 3 | 2 | 1 |
🥗 Nutritional Requirements
Specify minimum daily requirements for each nutrient:
Nutritional Requirements
Protein | 8 |
Protein | 8 |
Fat | 6 |
Optimization Results
🚚 Capacitated Vehicle Routing Problem
Provide node coordinates and demands, plus vehicle capacity and number of vehicles.
\U0001F9EE Mathematical Formulation (Capacitated VRP)
| Symbol | Description |
|---|---|
| $$i,j \in N=\{0,\dots,n\}$$ | Nodes (0 = depot, 1..n = customers) |
| $$K$$ | Number of vehicles |
| $$c_{ij}$$ | Travel cost (distance) from node i to node j |
| $$d_i$$ | Demand at customer i |
| $$Q$$ | Vehicle capacity |
| $$x_{ij}\in\{0,1\}$$ | 1 if a vehicle travels directly from i to j |
| $$u_i\ge0$$ | Load on the vehicle immediately after visiting node i |
Objective
$$
\min \sum_{i\in N}\sum_{\substack{j\in N \\ j\neq i}} c_{ij}\,x_{ij}
$$
Minimize the total travel cost of all vehicles.
Subject to
Degree constraints
$$ \sum_{j\neq i} x_{ij} = 1 \quad \forall\, i\neq0 $$ $$ \sum_{i\neq j} x_{ij} = 1 \quad \forall\, j\neq0 $$Depot flow
$$ \sum_{j>0} x_{0j} = K $$ $$ \sum_{i>0} x_{i0} = K $$MTZ subtour-elimination & capacity
$$ u_i - u_j + Q\,x_{ij} \le Q - d_j \quad \forall\,i\neq j,\; i,j>0 $$ $$ u_0 = 0 $$ $$ 0 \le u_i \le Q $$
Input Vehicle Routing Data
0 | 50 | 50 | 10 |
0 | 50 | 50 | 0 |
1 | 20 | 20 | 10 |
2 | 80 | 20 | 15 |
3 | 20 | 80 | 10 |
4 | 80 | 80 | 10 |
5 | 50 | 10 | 20 |
Routes Summary