How to model decisions that are yes or no (fund a project, open a site), why solving the LP and rounding does not work, how logical rules, fixed costs and coverage promises become constraints, and how to solve a first nonlinear model.
Slides¶
Present full screen Download the PDF
Click or tap the slide to move forward, its left edge to go back; the arrow keys work too.
Reading¶
Integer and Nonlinear Models works through Qahwa House’s expansion choices in PuLP:
Projects: which of ten projects to fund from a 1,000 k SAR budget, and why the LP relaxation funds 74% of a POS system. Rounding it down loses 36% of the value, and with one riyal less the best plan shares no project with the original.
Kiosks: where to open drive-through kiosks so that every district has one within 10 minutes, and what that promise costs in profit (219.6 k SAR a year).
Cash reserve: how to spread it across four funds with SciPy, cutting the risk by about 30% at the same expected return.
Lab 12: Capital budgeting and facility location¶
Qahwa House has a capital budget of 1,000 k SAR and wants to open drive-through kiosks in north Riyadh. Which projects should it fund, and which kiosks should it open?
Projects: build the capital budget with its logical rules, then see what rounding the LP and a one-riyal cut do to the plan.
Kiosks: build the coverage matrix, find the cheapest set of kiosks that reaches every district, and model kiosk profits with fixed costs and a big-M link.
Report: say what the 10-minute promise costs and write the recommendation for the board.
Open the lab, then use its Open in Colab button. Its first cell installs PuLP 4 with the HiGHS solver in Colab. On your own computer, run
pip install "pulp[highs]>=4.3,<5"once.Data: the notebook downloads both files by itself.
qahwa_projects.csv: 10 projects with their cost, NPV and logical rules.
qahwa_sites.csv: 96 rows, one per candidate site and district, with the driving time, the kiosk’s yearly cost and capacity, and the district’s demand.
Submit before the next lab session. The solutions are for checking your work afterwards.
Next week¶
Decision analysis: payoff tables, decision trees, the value of information and attitudes to risk.