Anatomy of an LP: Decision Variables, Objective, Constraints
Identify and formulate the three structural pieces of a linear program: decision variables, the objective function, and constraints (including non-negativity).
Tutorial
The Three Pieces of a Linear Program
Every linear program (LP) is built from three pieces:
- Decision variables — the unknown quantities under our control.
- Objective function — a linear function of the decision variables we want to maximize or minimize.
- Constraints — linear inequalities or equalities the variables must satisfy.
This tutorial focuses on the first piece.
Decision variables represent quantities the decision-maker chooses. Typical examples are units to produce, dollars to invest, hours to allocate, or kilograms to ship. We give them symbols like and we always state what each one measures, including units and time frame.
For example, suppose a farmer must decide how to split land between wheat and corn for the upcoming season. Two natural decision variables are
Notice that the definition pins down what is being chosen and in what units. Without the units and time frame, the rest of the LP would be ambiguous.