Optimization course project, University of Pisa (Data Science and Business Informatics). Also published as a Kaggle notebook.
A company has 7 candidate projects but cannot fund all of them: the budget is capped at $9,500 and only 20 operators are available. Projects also have a business constraint — if both Project 2 and Project 6 are selected, Project 4 cannot be selected.
The goal is to choose the subset of projects that maximizes total return while respecting the budget, operator, and mutual-exclusivity constraints.
| Project | Operators required | Capital required | Estimated return |
|---|---|---|---|
| 1 | 7 | $2,500 | $6,500 |
| 2 | 6 | $1,750 | $5,500 |
| 3 | 9 | $3,000 | $6,000 |
| 4 | 5 | $1,500 | $4,500 |
| 5 | 6 | $1,450 | $3,750 |
| 6 | 4 | $1,600 | $5,250 |
| 7 | 8 | $3,250 | $7,500 |
Binary decision variable x_i = 1 if project i is selected, else 0.
maximize Z = Σ return_i · x_i
subject to
Σ operators_i · x_i ≤ 20 (operator constraint)
Σ capital_i · x_i ≤ 9500 (budget constraint)
x_2 + x_6 + x_4 ≤ 2 (mutual-exclusivity constraint)
Optimal portfolio: Projects 1, 6, and 7 — total return Z = $19,250.
Verified with two independent solvers, which agree exactly:
| Solver | Selected projects | Objective (Z) |
|---|---|---|
| AMPL + CPLEX | 1, 6, 7 | 19,250 |
| Python (PuLP + CBC) | 1, 6, 7 | 19,250 |
Resource usage at the optimum: 19 of 20 operators used, $7,350 of $9,500 budget used — both constraints satisfied with slack, and the linked-projects constraint holds (only 2 of {2, 4, 6} are selected).
logistics-ilp-optimization/
├── report_aliyev.pdf Full project report (formulation + AMPL solve log)
├── company_projects.mod AMPL model file
├── company_projects.dat AMPL data file
├── solve_logistics.py Independent Python (PuLP) implementation + result chart
└── project_selection_results.png Bar chart of selected vs. non-selected projects (generated by the script)
AMPL / CPLEX:
ampl: model company_projects.mod;
ampl: data company_projects.dat;
ampl: option solver cplex;
ampl: solve;
ampl: display x;
ampl: display Z;
Python (open-source alternative, no AMPL license needed):
pip install pulp pandas matplotlib
python solve_logistics.pyRahman Aliyev — Master's student, Data Science and Business Informatics, University of Pisa