Constraint
Study guide: Exam CP-311
A Constraint is a limit on the values of the decision variables in an optimization model. The decision variables are the quantities the decision maker controls, such as how much of each product to make or how much to invest in each stock. The model chooses their values to make an objective, such as profit or cost, as large or as small as it can, while meeting every constraint.
Constraints come from two places:
- Business rules. Limits the organization sets itself, such as no worker working more than five days in a row, or no more than 2% of a portfolio in any one stock.
- Physical laws. Limits that hold whatever anyone decides, such as no one working a negative number of hours.
In a managerial decision, the constraints are the limited resources and the rules the decision must respect, written as equations or inequalities.
A linear constraint on the decision variables x_1, \ldots, x_n is
a_1x_1 + a_2x_2 + \cdots + a_nx_n \le b
a_jis the amount of the limited resource used by one unit ofx_j.bis the amount of the resource available, called the right-hand side.
A constraint can also be written with \ge or =. Strict inequalities such as x > 0 are not allowed. Most models also carry non-negativity constraints, x_j \ge 0, because a product cannot be made in a negative amount.
How are this bakery's limits written as constraints? A bakery makes
xcakes andypies a day, earning\$3on each cake and\$2on each pie. Each takes one hour of oven time, and the oven runs 10 hours a day. At most 6 cakes and 8 pies can be sold each day.Answer
- The decision variables are
xandy, and the objective is to maximize the profitz = 3x + 2y.- Oven time gives
x + y \le 10.- The demand for cakes gives
x \le 6, and the demand for pies givesy \le 8.- The non-negativity constraints are
x \ge 0andy \ge 0.
Feasible and optimal solutions
A feasible solution satisfies every constraint. The set of all feasible solutions is the feasible region. An optimal solution is the best feasible solution, the one with the highest objective value in a maximization or the lowest in a minimization.
A constraint is redundant if deleting it does not make the feasible region any larger.
In the bakery above, are 5 cakes and 5 pies a feasible plan, and are 4 cakes and 7 pies?
- 5 cakes and 5 pies use
5 + 5 = 10oven hours, and both are within demand, so the plan is feasible. Its profit is3(5) + 2(5) = \$25.- 4 cakes and 7 pies need
4 + 7 = 11oven hours, more than the 10 available. The plan breaks the oven constraint, so it is infeasible.
Binding and non-binding constraints
An inequality constraint is binding if it holds with equality at the optimal solution. It is non-binding if it does not. A binding constraint is a limit the decision is pressing against. A non-binding constraint has some of its resource left over, called its slack.
The bakery's best plan is 6 cakes and 4 pies, for
\$26. Which constraints are binding?
- Oven time:
6 + 4 = 10, all 10 hours, so it is binding.- Cake demand:
6 = 6, so it is binding.- Pie demand:
4 < 8, so it is non-binding, with a slack of 4 pies.
Shadow price
The shadow price of a constraint is the increase in the optimal objective value per unit increase in its right-hand side. If the optimal value z^* changes by \Delta z^* when the right-hand side b rises by \Delta b, the shadow price is
\frac{\Delta z^*}{\Delta b}
The shadow price is valid only while the right-hand side stays within its allowable range. Within that range the optimal solution keeps the same structure, so the optimal value changes linearly. The shadow price of a non-binding constraint is 0, since more of a resource that is already left over changes nothing.
A shadow price tells the decision maker the most it is worth paying for one more unit of a limited resource.
Should the bakery pay
\$1.50to run the oven an eleventh hour?
- With 11 oven hours and at most 6 cakes, the best plan becomes 6 cakes and 5 pies, for a profit of
3(6) + 2(5) = \$28.- The profit rises by
28 - 26 = \$2for one extra hour, so the oven constraint's shadow price is\$2an hour.- The extra hour is worth
\$2and costs\$1.50, so the bakery should pay for it.- More pie demand is worth nothing. The pie constraint is non-binding, so its shadow price is 0.
Nonlinear and integer constraints
A constraint need not be linear. In a portfolio model, the variance of the portfolio's return held below a specified amount is a nonlinear constraint, since the variance depends on the products of the investment proportions. A model with nonlinear constraints or a nonlinear objective is a nonlinear optimization model.
A constraint can also require a decision variable to take whole-number values, or only the values 0 and 1 for a yes-or-no decision. These are discrete constraints, and a model with them is a discrete optimization model.
Why can requiring whole items only raise the cost of the cheapest meal? A diet model finds the cheapest meal that meets limits on calories, fat, sodium and protein. Allowing fractions of menu items, the cheapest meal costs
\$2.37. When each item must be bought whole, the cheapest meal costs\$3.Answer
- Requiring whole items adds a constraint to the model.
- Every meal of whole items was already feasible before, so the feasible region can only shrink.
- The cheapest meal in a smaller region cannot cost less, so the cost rises from
\$2.37to\$3.
Using a shadow price outside its range A shadow price holds only while the right-hand side stays within its allowable range. The bakery's oven hours are worth
\$2each only until pie demand runs out. At 14 hours the bakery makes 6 cakes and 8 pies, and a fifteenth hour is worth nothing. Check the range before multiplying a shadow price by a large change.