Type: MILP (Mixed Integer Linear Programming)
This handbook explains the Facility Location sample problem in the LP Black Box platform.
This combines binary decisions (which facilities to open) with continuous decisions (how much to ship).
A company wants to open warehouses to serve 3 customer regions. They can choose from 4 potential warehouse locations. Each warehouse has a fixed operating cost, and shipping costs vary by route.
| Warehouse | Fixed Cost ($) | Capacity |
|---|---|---|
| Warehouse 1 | 1000 | 200 |
| Warehouse 2 | 800 | 150 |
| Warehouse 3 | 1200 | 250 |
| Warehouse 4 | 900 | 180 |
| Route | Shipping Cost per Unit |
|---|---|
| W1 → Customer A | 5 |
| W1 → Customer B | 7 |
| W1 → Customer C | 6 |
| W2 → Customer A | 4 |
| W2 → Customer B | 8 |
| W2 → Customer C | 5 |
| W3 → Customer A | 6 |
| W3 → Customer B | 5 |
| W3 → Customer C | 7 |
| W4 → Customer A | 7 |
| W4 → Customer B | 6 |
| W4 → Customer C | 8 |
Demand: Customer A: 80, Customer B: 100, Customer C: 70
Minimize total cost (fixed + shipping) while meeting all demand.
| Variable | Type | Meaning |
|---|---|---|
| open1 | Binary (0 or 1) | Open Warehouse 1? |
| open2 | Binary (0 or 1) | Open Warehouse 2? |
| open3 | Binary (0 or 1) | Open Warehouse 3? |
| open4 | Binary (0 or 1) | Open Warehouse 4? |
| ship1A | Continuous ≥ 0 | Units from W1 to Customer A |
| ship1B | Continuous ≥ 0 | Units from W1 to Customer B |
| ... | ... | ... |
Demand Satisfaction (for each customer):
ship1A + ship2A + ship3A + ship4A = 80ship1B + ship2B + ship3B + ship4B = 100ship1C + ship2C + ship3C + ship4C = 70Capacity (if warehouse not open, shipments must be 0):
ship1A + ship1B + ship1C ≤ 200 × open1ship2A + ship2B + ship2C ≤ 150 × open2ship3A + ship3B + ship3C ≤ 250 × open3ship4A + ship4B + ship4C ≤ 180 × open4Minimum Open Warehouses: Must open at least 2:
open1 + open2 + open3 + open4 ≥ 2Minimize: Fixed costs + Shipping costs
This is a Mixed Integer problem because:
open1, open2, open3, open4 (yes/no decisions)ship1A, ship1B, ... (quantities to ship)The binary variables make this an MILP - much harder than pure LP, but enables realistic facility planning.
Select Facility Location from the dropdown.
The solver finds which warehouses to open and how much to ship from each.
This demonstrates how MILP combines discrete decisions (where to invest) with continuous decisions (how much to allocate).