Math 407 — Linear Optimization, Lecture notes of Linear Algebra

This document introduces the concept of optimization and linear programming problems. It explains the objective function and feasible region, and how they are used to solve optimization problems. The document also provides an example of a plastic cup factory and how linear programming can be used to maximize profit. useful for students studying optimization, linear programming, and related topics.

Typology: Lecture notes

2021/2022

Uploaded on 05/11/2023

courtneyxxx
courtneyxxx 🇺🇸

4.5

(14)

253 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 407 Linear Optimization
1 Introduction
1.1 What is optimization?
A mathematical optimization problem is one in which some function is either maximized or
minimized relative to a given set of alternatives. The function to be minimized or maximized
is called the objective function and the set of alternatives is called the feasible region (or
constraint region). In this course, the feasible region is always taken to be a subset of Rn
(real n-dimensional space) and the objective function is a function from Rnto R.
We further restrict the class of optimization problems that we consider to linear program-
ming problems (or LPs). An LP is an optimization problem over Rnwherein the objective
function is a linear function, that is, the objective has the form
c1x1+c2x2+···+cnxn
for some ci2Ri=1,...,n, and the feasible region is the set of solutions to a finite number
of linear inequality and equality constraints, of the form
ai1xi+ai2x2+···+ain xnbii=1,...,s
and
ai1xi+ai2x2+···+ain xn=bii=s+1,...,m.
Linear programming is an extremely powerful tool for addressing a wide range of applied
optimization problems. A short list of application areas is resource allocation, produc-
tion scheduling, warehousing, layout, transportation scheduling, facility location, flight crew
scheduling, portfolio optimization, parameter estimation, . . . .
1.2 An Example
To il l u s trate s o m e of the ba s i c featu r e s of LP, we b e g i n with a si m p le tw o-dim e n siona l
example. In modeling this example, we will review the four basic steps in the development
of an LP model:
1. Identify and label the decision variables.
2. Determine the objective and use the decision variables to write an expression for the
objective function as a linear function of the decision variables.
3. Determine the explicit constraints and write a functional expression for each of them
as either a linear equation or a linear inequality in the decision variables.
2
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Math 407 — Linear Optimization and more Lecture notes Linear Algebra in PDF only on Docsity!

Math 407 — Linear Optimization

1 Introduction

1.1 What is optimization?

A mathematical optimization problem is one in which some function is either maximized or minimized relative to a given set of alternatives. The function to be minimized or maximized is called the objective function and the set of alternatives is called the feasible region (or constraint region). In this course, the feasible region is always taken to be a subset of R n (real n-dimensional space) and the objective function is a function from R n^ to R. We further restrict the class of optimization problems that we consider to linear program- ming problems (or LPs). An LP is an optimization problem over R n^ wherein the objective function is a linear function, that is, the objective has the form

c 1 x 1 + c 2 x 2 + · · · + c (^) n x (^) n

for some c (^) i 2 R i = 1,... , n, and the feasible region is the set of solutions to a finite number of linear inequality and equality constraints, of the form

a (^) i 1 x (^) i + a (^) i 2 x 2 + · · · + a (^) in x (^) n  b (^) i i = 1,... , s

and a (^) i 1 x (^) i + a (^) i 2 x 2 + · · · + a (^) in x (^) n = b (^) i i = s + 1,... , m.

Linear programming is an extremely powerful tool for addressing a wide range of applied optimization problems. A short list of application areas is resource allocation, produc- tion scheduling, warehousing, layout, transportation scheduling, facility location, flight crew scheduling, portfolio optimization, parameter estimation,....

1.2 An Example

To illustrate some of the basic features of LP, we begin with a simple two-dimensional example. In modeling this example, we will review the four basic steps in the development of an LP model:

  1. Identify and label the decision variables.
  2. Determine the objective and use the decision variables to write an expression for the objective function as a linear function of the decision variables.
  3. Determine the explicit constraints and write a functional expression for each of them as either a linear equation or a linear inequality in the decision variables.
  1. Determine the implicit constraints, and write each as either a linear equation or a linear inequality in the decision variables.

PLASTIC CUP FACTORY A local family-owned plastic cup manufacturer wants to optimize their production mix in order to maximize their profit. They produce personalized beer mugs and champagne glasses. The profit on a case of beer mugs is $25 while the profit on a case of champagne glasses is $20. The cups are manufactured with a machine called a plastic extruder which feeds on plastic resins. Each case of beer mugs requires 20 lbs. of plastic resins to produce while champagne glasses require 12 lbs. per case. The daily supply of plastic resins is limited to at most 1800 pounds. About 15 cases of either product can be produced per hour. At the moment the family wants to limit their work day to 8 hours.

We will model the problem of maximizing the profit for this company as an LP. The first step in our modeling process is to identify and label the decision variables. These are the variables that represent the quantifiable decisions that must be made in order to determine the daily production schedule. That is, we need to specify those quantities whose values completely determine a production schedule and its associated profit. In order to determine these quantities, one can ask the question “If I were the plant manager for this factory, what must I know in order to implement a production schedule?” The best way to identify the decision variables is to put oneself in the shoes of the decision maker and then ask the question “What do I need to know in order to make this thing work?” In the case of the plastic cup factory, everything is determined once it is known how many cases of beer mugs and champagne glasses are to be produced each day.

Decision Variables:

B = # of cases of beer mugs to be produced daily.

C = # of cases of champagne glasses to be produced daily.

You will soon discover that the most dicult part of any modeling problem is identifying the decision variables. Once these variables are correctly identifies then the remainder of the modeling process usually goes smoothly. After identifying and labeling the decision variables, one then specifies the problem ob- jective. That is, write an expression for the objective function as a linear function of the decision variables.

Objective Function:

Maximize profit where profit = 25B + 20C

The next step in the modeling process is to express the feasible region as the solution set of a finite collection of linear inequality and equality constraints. We separate this process into two steps:

understand its robustness, and makes it dicult to modify the model as it evolves. Never be afraid to add more decision variables either to clarify the model or to improve its flexibility. Modern LP software easily solves problems with tens of thousands of variables, and in some cases tens of millions of variables. It is more important to get a correct, easily interpretable, and flexible model then to provide a compact minimalist model. We now turn to solving the Plastic Cup Factory problem. Since this problem is two dimensional it is possible to provide a graphical representation and solution. The first step is to graph the feasible region. To do this, first graph

14

15

13 12

1 4

11 10 9 8

5

6

7

4 3 2 1

2 3 5 6 7 8 9 10 11 12 13 14 15

feasible region

B

optimal value = $

20 B + 12C = 1800

solution B C^ ^ = ^4575

151 B^ +^151 C^ = 8

C

objective normal n = ^2520

1

the line associated with each of the linear inequality constraints. Then determine on which side of each of these lines the feasible region must lie (don’t forget the implicit constraints!). To determine the correct side, locate a point not on the line that determines the constraint (for example, the origin is often not on the line, and it is particularly easy to use). Plug this point in and see if it satisfies the constraint. If it does, then it is on the correct side of the line. If it does not, then the other side of the line is correct. Once the correct side is determined put little arrows on the line to remind yourself of the correct side. Then shade in the resulting feasible region which is the set of points feasible for all of the linear inequalities. The next step is to draw in the vector representing the gradient of the objective function. This vector may be placed anywhere on your graph, but it is often convenient to draw it emanating from the origin. Since the objective function has the form

f (x 1 , x 2 ) = c 1 x 1 + c 2 x 2 ,

the gradient of f is the same at every point in R 2 ;

rf (x 1 , x 2 ) =

c (^1) c (^2)

Recall from calculus that the gradient always points in the direction of increasing function values. Moreover, since the gradient is constant on the whole space, the level sets of f associated with di↵erent function values are given by the lines perpendicular to the gradient. Consequently, to obtain the location of the point at which the objective is maximized we simply set a ruler perpendicular to the gradient and then move the ruler in the direction of the gradient until we reach the last point (or points) at which the line determined by the ruler intersects the feasible region. In the case of the cup factory problem this gives the solution to the LP as

B

C

75

We now recap the steps followed in the solution procedure given above:

Step 1: Graph each of the linear constraints indicating on which side of the constraint the feasible region must lie with an arrow. Don’t forget the implicit constraints!

Step 2: Shade in the feasible region.

Step 3: Draw the gradient vector of the objective function.

Step 4: Place a straight-edge perpendicular to the gradient vector and move the straight- edge either in the direction of the gradient vector for maximization (or in the oppo- site direction of the gradient vector for minimization) to the last point for which the straight-edge intersects the feasible region. The set of points of intersection between the straight-edge and the feasible region is the set of solutions to the LP.

Step 5: Compute the exact optimal vertex solutions to the LP as the points of intersection of the lines on the boundary of the feasible region indicated in Step 4. Then compute the resulting optimal value associated with these points.

1.3.1 The Optimal Value Function and Marginal Values

Next consider the e↵ect of fluctuations in the availability of resources on both the optimal solution and the optimal value. In the case of the cup factory there are two basic resources consumed by the production process: plastic resin and labor hours. In order to analyze the behavior of the problem as the value of these resources is perturbed, we first observe a geometric property of the optimal solution, namely that the optimal solution lies at a “corner point” or “vertex” of the feasible region. More will be made of the notion of a vertex later, but for the moment suce it to say that if an optimal solution to an LP exists then there is at least one optimal solution that is a vertex of the feasible region. Next note that as the availability of a resource is changed the constraint line associated with that resource moves in a parallel fashion along a line normal to the constraint. Thus, at least for a small range of perturbations to the resources, the vertex associated with the current optimal solution moves but remains optimal. (We caution that this is only a generic property of an optimal vertex and there are examples for which it fails; for example, in some models the feasible region can be made empty under arbitrarily small perturbations of the resources.) These observations lead us to conjecture that the solution to the LPs

v(✏ 1 , ✏ 2 ) = max 25B + 20C subject to 20 B + 12C  1800 + ✏ (^1) 1 15 B^ +^

1 15 C^ ^ 8 +^ ✏^2 0  B, C

lies at the intersection of the two lines 20B + 12C = 1800 + ✏ 1 and 151 B + 151 C = 8 + ✏ 2 for small values of ✏ 1 and ✏ 2 ; namely

B = 45 452 ✏ 2 + 18 ✏ (^1) C = 75 + 752 ✏ 2 18 ✏ 1 , and v(✏ 1 , ✏ 2 ) = 2625 + 3752 ✏ 2 + 58 ✏ 1.

It can be verified by direct computation that this indeed yields the optimal solution for small values of ✏ 1 and ✏ 2. Next observe that the value v(✏ 1 , ✏ 2 ) can now be viewed as a function of ✏ 1 and ✏ 2 and that this function is di↵erentiable at

✏ (^2)

0

with

rv(✏ 1 , ✏ 2 ) =

The number 58 is called the marginal value of the resin resource at the optimal solution B C

75

, and the number 3752 is called the marginal value of the labor time resource at the

optimal solution

B

C

75

. We have the following interpretation for these marginal values: each additional pound of resin beyond the base amount of 1800 lbs. contributes $ 58 to the

profit and each additional hour of labor beyond the base amount of 8 hours contributes $ (^3752) to the profit. Using this information one can answer certain questions concerning how one might change current operating limitations. For example, if we can buy additional resin from another supplier, how much more per pound are we willing to pay than we are currently paying? (Answer: $ 58 per pound is the most we are willing to pay beyond what we now pay, why?) Or, if we are willing to add overtime hours, what is the greatest overtime salary we are willing to pay? Of course, the marginal values are only good for a certain range of fluctuation in the resources, but within that range they provide valuable information.

1.4 Duality Theory

We now briefly discuss the economic theory behind the marginal values and how the “hidden hand of the market place” gives rise to them. This leads in a natural way to a mathematical theory of duality for linear programming. Think of the cup factory production process as a black box through which the resources flow. Raw resources go in one end and exit the other. When they come out the resources have a di↵erent form, but whatever comes out is still comprised of the entering resources. However, something has happened to the value of the resources by passing through the black box. The resources have been purchased for one price as they enter the box and are sold in their new form when they leave. The di↵erence between the entering and exiting prices is called the profit. Assuming that there is a positive profit the resources have increased in value as they pass through the production process. Let us now consider how the market introduces pressures on the profitability and the value of the resources available to the market place. We take the perspective of the cup factory vs the market place. The market place does not want the cup factory to go out of business. On the other hand, it does not want the cup factory to see a profit. It wants to keep all the profit for itself and only let the cup factory just break even. It does this by setting the price of the resources available in the market place. That is, the market sets the price for plastic resin and labor and it tries to do so in such a way that the cup factory sees no profit and just breaks even. Since the cup factory is now seeing a profit, the market must figure out by how much the sale price of resin and labor must be raised to reduce this profit to zero. This is done by minimizing the value of the available resources over all price increments that guarantee that the cup factory either loses money or sees no profit from both of its products. If we denote the per unit price increment for resin by R and that for labor by L, then the profit for beer mugs is eliminated as long as

20 R +

L 25

since the left hand side represents the increased value of the resources consumed in the production of one case of beer mugs and the right hand side is the current profit on a case

  1. The marginal values are the partial derivatives of the value function for the LP with respect to resource availability,
  2. The marginal values give the per unit increase in value of each of the resources that occurs as a result of the production process, and
  3. The marginal values are the solutions to a dual LP, D.

1.5 LPs in Standard Form and Their Duals

Recall that a linear program is a problem of maximization or minimization of a linear func- tion subject to a finite number of linear inequality and equality constraints. This general definition leads to an enormous variety of possible formulations. In this section we propose one fixed formulation for the purposes of developing an algorithmic solution procedure and developing the theory of linear programming. We will show that every LP can be recast in this one fixed form. We say that an LP is in standard form if it has the form

P : maximize c 1 x 1 + c 2 x 2 + · · · + c (^) n x (^) n subject to a (^) i 1 x 1 + a (^) i 2 x 2 + · · · + a (^) in x (^) n  b (^) i for i = 1, 2 ,... , m 0  x (^) j for j = 1, 2 ,... , n.

Using matrix notation, we can rewrite this LP as

P : maximize c T^ x subject to Ax  b 0  x ,

where c 2 R n^ , b 2 R m^ , A 2 R m⇥n^ and the inequalities Ax  b and 0  x are to be interpreted componentwise. Following the results of the previous section on LP duality, we claim that the dual LP to P is the LP

D : minimize b 1 y 1 + b 2 y 2 + · · · + b (^) m y (^) m subject to a (^1) j y 1 + a (^2) j y 2 + · · · + a (^) mj y (^) m c (^) j for j = 1, 2 ,... , n 0  y (^) i for i = 1, 2 ,... , m ,

or, equivalently, using matrix notation we have

D : minimize b T^ y subject to AT^ y c 0  y.

Just as for the cup factory problem, the LPs P and D are related via the Weak Duality Theorem for linear programming.

Theorem 1.1 (Weak Duality Theorem) If x 2 R n^ is feasible for P and y 2 R m^ is feasible for D, then c T^ x  y T^ Ax  b T^ y.

Thus, if P is unbounded, then D is necessarily infeasible, and if D is unbounded, then P is necessarily infeasible. Moreover, if c T^ x¯ = b T^ y¯ with x¯ feasible for P and y¯ feasible for D, then x¯ must solve P and y¯ must solve D.

Proof: Let x 2 R n^ be feasible for P and y 2 R m^ be feasible for D. Then

c T^ x =

Pn j=

c (^) j x (^) j

Pn j=

Pm i=

a (^) ij y (^) i )x (^) j [since 0  x (^) j and c (^) j 

Pm i=

a (^) ij y (^) i , so c (^) j x (^) j  (

Pm i=

a (^) ij y (^) i )x (^) j ]

= y T^ Ax

Pm i=

Pn j=

a (^) ij x (^) j )y (^) i

Pm i=

b (^) i y (^) i [since 0  y (^) i and

Pn j=

a (^) ij x (^) j  b (^) i , so (

Pn j=

a (^) ij x (^) j )y (^) i  b (^) i y (^) i ]

= b T^ y

To see that c T^ x¯ = b T^ ¯y plus P–D feasibility implies optimality, simply observe that for every other P–D feasible pair (x, y) we have

c T^ x  b T^ y¯ = c T^ x¯  b T^ y.

⌅ We caution that the infeasibility of either P or D does not imply the unboundedness of the other. Indeed, it is possible for both P and D to be infeasible as is illustrated by the following example.

Example: maximize 2 x 1 x (^2) x 1 x 2  1 x 1 + x 2  2 0  x 1 , x (^2)

1.5.1 Transformation to Standard Form

Every LP can be transformed to an LP in standard form. This process usually requires a transformation of variables and occasionally the addition of new variables. In this section we provide a step-by-step procedure for transforming any LP to one in standard form.

An interval bound of the form l (^) i  x (^) i  u (^) i can be transformed into one non-negativity constraint and one linear inequality constraint in standard form by making the substi- tution x (^) i = w (^) i + l (^) i. In this case, the bounds l (^) i  x (^) i  u (^) i are equivalent to the constraints

0  w (^) i and w (^) i  u (^) i l (^) i.

free variables

Sometimes a variable is given without any bounds. Such variables are called free vari- ables. To obtain standard form every free variable must be replaced by the di↵erence of two non-negative variables. That is, if x (^) i is free, then we get

x (^) i = u (^) i v (^) i

with 0  u (^) i and 0  v (^) i.

To illustrate the ideas given above, we put the following LP into standard form.

minimize 3 x 1 x (^2) subject to x 1 + 6 x 2 x 3 + x 4 3 7 x 2 + x 4 = 5 x 3 + x 4  2

1  x 2 , x 3  5 , 2  x 4  2. The hardest part of the translation to standard form, or at least the part most susceptible to error, is the replacement of existing variables with non-negative variables. For this reason, I usually make the translation in two steps. In the first step I make all of the changes that do not involve variable substitution, and then, in the second step, I start again and do all of the variable substitutions. Following this procedure, let us start with all of the transformations that do not require variable substitution. First, turn the minimization problem into a maximization problem by rewriting the objective as

maximize 3 x 1 + x 2.

Next we replace the first inequality constraint by the constraint

x 1 6 x 2 + x 3 x 4  3.

The equality constraint is replaced by the two inequality constraints

7 x 2 + x 4  5 7 x 2 x 4  5.

Finally, the double bound 2  x 4  2 indicates that we should group the upper bound with the linear inequalities. All of these changes give the LP

maximize 3 x 1 + x (^2) subject to x 1 6 x 2 + x 3 x 4  3 7 x 2 + x 4  5 7 x 2 x 4  5 x 3 + x 4  2 x 4  2

1  x 2 , x 3  5 , 2  x 4. We now move on to variable replacement. Observe that the variable x 1 is free, so we replace it by x 1 = z 1 + z 1 with 0  z 1 + , 0  z 1 .

The variable x 2 has a non-zero lower bound so we replace it by

z 2 = x 2 + 1 or x 2 = z 2 1 with 0  z 2.

The variable x 3 is bounded above, so we replace it by

z 3 = 5 x 3 or x 3 = 5 z 3 with 0  z 3.

The variable x 5 is bounded below, so we replace it by

z 4 = x 4 + 2 or x 4 = z 4 2 with 0  z 4.

After making these substitutions, we get the following LP in standard form:

maximize 3 z + 1 + 3 z 1 + z (^2) subject to z + 1 z 1 6 z 2 z 3 z 4  10 7 z 2 + z 4  14 7 z 2 z 4  14 z 3 + z 4  1 z 4  4

0  z + 1 , z 1 , z 2 , z 3 , z 4.