Path: blob/main/notebooks/07/02-bim-robustness-analysis.ipynb
663 views
7.2 Robustness analysis of BIM production plan via simulations
Preamble: Install Pyomo and a solver
The following cell sets and verifies a global SOLVER for the notebook. If run on Google Colab, the cell installs Pyomo and the HiGHS solver, while, if run elsewhere, it assumes Pyomo and HiGHS have been previously installed. It then sets to use HiGHS as solver via the appsi module and a test is performed to verify that it is available. The solver interface is stored in a global object SOLVER for later use.
Problem description
This example is a continuation of the BIM chip production problem illustrated here. Recall hat BIM produces logic and memory chips using copper, silicon, germanium, and plastic and that each chip requires the following quantities of raw materials:
| chip | copper | silicon | germanium | plastic |
|---|---|---|---|---|
| logic | 0.4 | 1 | - | 1 |
| memory | 0.2 | - | 1 | 1 |
BIM needs to carefully manage the acquisition and inventory of these raw materials based on the forecasted demand for the chips. Data analysis led to the following prediction of monthly demands:
| chip | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| logic | 88 | 125 | 260 | 217 | 238 | 286 | 248 | 238 | 265 | 293 | 259 | 244 |
| memory | 47 | 62 | 81 | 65 | 95 | 118 | 86 | 89 | 82 | 82 | 84 | 66 |
At the beginning of the year, BIM has the following stock:
| copper | silicon | germanium | plastic |
|---|---|---|---|
| 480 | 1000 | 1500 | 1750 |
The company would like to have at least the following stock at the end of the year:
| copper | silicon | germanium | plastic |
|---|---|---|---|
| 200 | 500 | 500 | 1000 |
Each raw material can be acquired at each month, but the unit prices vary as follows:
| product | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| copper | 1 | 1 | 1 | 2 | 2 | 3 | 3 | 2 | 2 | 1 | 1 | 2 |
| silicon | 4 | 3 | 3 | 3 | 5 | 5 | 6 | 5 | 4 | 3 | 3 | 5 |
| germanium | 5 | 5 | 5 | 3 | 3 | 3 | 3 | 2 | 3 | 4 | 5 | 6 |
| plastic | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 |
The inventory is limited by a capacity of a total of 9000 units per month, regardless of the type of material of products in stock. The holding costs of the inventory are 0.05 per unit per month regardless of the material type. Due to budget constraints, BIM cannot spend more than 5000 per month on acquisition.
BIM aims at minimizing the acquisition and holding costs of the materials while meeting the required quantities for production. The production is made to order, meaning that no inventory of chips is kept.
Let us model the material acquisition planning and solve it optimally based on the forecasted chip demand above.
Actual performance of the robust solution
We now perform a stochastic simulation to assess the performance of the robust solutions that we found earlier.
We now simulate 50 trajectories assuming there is a uncertainty around the nominal demand.
The simulation results report a sllighly higher inventory cost and a nonzero amount of missed chip demand.