← Back to Handbooks

Facility Location - Handbook

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).


The Problem

Scenario

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.

WarehouseFixed Cost ($)Capacity
Warehouse 11000200
Warehouse 2800150
Warehouse 31200250
Warehouse 4900180
RouteShipping Cost per Unit
W1 → Customer A5
W1 → Customer B7
W1 → Customer C6
W2 → Customer A4
W2 → Customer B8
W2 → Customer C5
W3 → Customer A6
W3 → Customer B5
W3 → Customer C7
W4 → Customer A7
W4 → Customer B6
W4 → Customer C8

Demand: Customer A: 80, Customer B: 100, Customer C: 70

Your Goal

Minimize total cost (fixed + shipping) while meeting all demand.

The Variables

VariableTypeMeaning
open1Binary (0 or 1)Open Warehouse 1?
open2Binary (0 or 1)Open Warehouse 2?
open3Binary (0 or 1)Open Warehouse 3?
open4Binary (0 or 1)Open Warehouse 4?
ship1AContinuous ≥ 0Units from W1 to Customer A
ship1BContinuous ≥ 0Units from W1 to Customer B
.........

The Constraints

  1. Demand Satisfaction (for each customer):

    • ship1A + ship2A + ship3A + ship4A = 80
    • ship1B + ship2B + ship3B + ship4B = 100
    • ship1C + ship2C + ship3C + ship4C = 70
  2. Capacity (if warehouse not open, shipments must be 0):

    • ship1A + ship1B + ship1C ≤ 200 × open1
    • ship2A + ship2B + ship2C ≤ 150 × open2
    • ship3A + ship3B + ship3C ≤ 250 × open3
    • ship4A + ship4B + ship4C ≤ 180 × open4
  3. Minimum Open Warehouses: Must open at least 2:

    • open1 + open2 + open3 + open4 ≥ 2

The Objective

Minimize: Fixed costs + Shipping costs


Why MILP?

This is a Mixed Integer problem because:

The binary variables make this an MILP - much harder than pure LP, but enables realistic facility planning.


How to Use

Step 1: Load the Sample

Select Facility Location from the dropdown.

Step 2: Solve

The solver finds which warehouses to open and how much to ship from each.

Step 3: Interpret Results


Try It Yourself


Real-World Applications


This demonstrates how MILP combines discrete decisions (where to invest) with continuous decisions (how much to allocate).