Indicator Variables for On/Off Activities

Use binary indicator variables to model activities that can be turned on or off, including capacity limits, fixed setup costs, and minimum operating levels.

Step 1 of 157%

Tutorial

Indicator Variables for On/Off Decisions

Many optimization problems involve activities that can be either on or off: a factory operates or stays idle, a facility is opened or not, a delivery route is used or not. To model these decisions, we introduce a binary indicator variable:

y={1if the activity is on0if the activity is offy = \begin{cases} 1 & \text{if the activity is on} \\ 0 & \text{if the activity is off} \end{cases}

If the activity has a continuous level x0x \geq 0 (units produced, hours run, MW generated, etc.), we must force x=0x = 0 whenever y=0y = 0. This is done with a big-M linking constraint:

0xMy,0 \leq x \leq M\, y,

where MM is an upper bound on xx (typically the capacity). When y=0y = 0, the constraint forces x0x \leq 0, so x=0x = 0. When y=1y = 1, the constraint allows xx to be anywhere from 00 to MM.

For instance, a plant with capacity 200200 units is modeled by

x200y,x0,y{0,1}.x \leq 200\, y, \quad x \geq 0, \quad y \in \{0,1\}.

If y=0y = 0, then x0x \leq 0 forces x=0x = 0. If y=1y = 1, then 0x2000 \leq x \leq 200.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle