Lec 1 Modified
Lec 1 Modified
Lec 1 Modified
Week 1 Page 1 of 19
Solution: First notice that this problem is an optimization problem. Our
objective is to maximize the company's profit, which under the problem
assumptions, is equivalent to maximizing the company's daily profit (we
assume that both work stations can be used for 24 hours). Furthermore, we are
going to maximize the company profit by adjusting the levels of the daily
production for the two items P1 and P2. Therefore, these daily production
levels are the control/decision factors, the values of which we are called to
determine. In the analytical formulation of the problem, the role of these
factors is captured by modeling them as the problem decision variables:
x1 = number of units of product P1 to be produced daily,
x2 = number of units of product P2 to be produced daily.
In the light of the above discussion, the problem objective can be expressed
analytically as:
maximize f(x1, x2) = 200 x1 + 400 x2 (1)
Equation 1 will be called the objective function of the problem, and the
coefficients 200 and 400 which multiply the decision variables in it, will be
called the objective function coefficients.
Furthermore, any decision regarding the daily production levels for items P 1
and P2 in order to be realizable in the company's operation context must
observe the production capacity of the two worksations W 1 and W2. Hence,
our next step in the problem formulation seeks to introduce these
technological constraints in it. Let's focus first on the constraint which
expresses the finite production capacity of workstation W1. Regarding this
constraint, we know that 36 minutes of work dedicated to the production of
item P1 can result in one unit of that item, while 24 minutes of work dedicated
to the production of item P2 will provide one unit of it. (We assuming that
production of same unit of product require a constant amount of processing
time at both the workstations). Under the further assumption that the
combined production of both items has no side-effects, i.e., does not impose
any additional requirements for production capacity of workstation W1 (e.g.,
zero set-up times), the total capacity (in terms of time length in minutes)
required for producing x1 units of product P1 and x2 units of product P2 is equal
to 36x1 + 24x2. Hence, the technological constraint imposing the condition that
our total daily processing requirements for workstation W 1 should not exceed
its production capacity is analytically expressed by:
36x1 + 24x2 1440 (= 24*60) - notice the time is measured in minutes.
or 3x1 + 2x2 120 (after dividing by 12) (2)
Week 1 Page 2 of 19
Following the same line of reasoning (and under similar assumptions), the
constraint expressing the finite processing capacity of workstation W 2 is given
by:
28.8x1 + 28.8x2 1440 (=24*60)
or x1 + x 2 50 (after dividing by 28.8) (3)
Constraints 2 and 3 are known as the technological constraints of the
problem. In particular, the coefficients of the variables x i, i = 1,2 in them, Tij
where j, i = 1,2, are known as the technological coefficients of the problem
formulation (where T11 = 3, T12 = 2, T21 = 1 = T22), while the values on the
right-hand-side of the two inequalities define the right-hand side (rhs) vector
of the constraints.
Finally, to the above constraints we must add the requirement that any
permissible value for variables xi, i = 1, 2 must be nonnegative, i.e.,
xi 0 i = 1, 2 (4)
since these values express production levels. These constraints are known as
the variable sign restrictions.
Combining Equations 1 to 4, the analytical formulation of our problem is as
follows:
maximize f(x1, x2) = 200 x1 + 400 x2
s.t. 3x1 + 2x2 120
x1 + x2 50
xi 0 i = 1, 2 (5)
a1 x1 + a2 x2 b (7)
The set of points satisfying each of the two inequalities implied by Equation 7
is given by one of the two half-planes the boundary of which is defined by the
corresponding equality constraint a1 x1+ a2 x2 = b.
An easy way to determine the half-plane depicting the solution space of a
linear inequality, is to draw the line depicting the solution space of the
corresponding equality constraint, and then test whether the point (0,0)
Week 1 Page 4 of 19
satisfies the inequality. In case of a positive answer, the solution space is the
half-space containing the origin, otherwise, it is the other one. This, of course,
works only if b 0. In general we pick a point say ( , ) such that a1 + a2
b, then:
the solution space given by a1 x1+ a2 x2 b is the half-space containing
the point ( , ), provided a1 + a2 < b, otherwise, it is the other one,
the solution space given by a1 x1+ a2 x2 b is the half-space containing
the point ( , ), provided a1 + a2 > b, otherwise, it is the other one.
There is another way to find out the solution space given by a linear
inequality.
The solution space of the inequality given by a 1 x1+ a2 x2 b is that half-space
which lies below the line a1 x1+ a2 x2 = b, provided a2 > 0. In case a2 < 0 the
half-space lies above the line a1 x1+ a2 x2 = b.
The solution space of the inequality given by a 1 x1+ a2 x2 b is that half-space
which lies above the line a1 x1+ a2 x2 = b, provided a2 > 0. In case a2 < 0 the
half-space lies below the line a1 x1+ a2 x2 = b.
In case a2 = 0, the two inequalities to be considered are a1 x1 b and a1 x1 b.
The solution space of the inequality given by a 1x1 b is that half-space which
lies on the left of the line a 1 x1 = b, provided a1 > 0. In case a1 < 0 the half-
space lies on the right of the line a1 x1= b.
The solution space of the inequality given by a 1x1 b is that half-space which
lies on the right of the line a1 x1 = b, provided a1 > 0. In case a1 < 0 the half-
space lies on the left of the line a1 x1= b.
From the above discussion, it follows that the feasible region for the prototype
LP of Equation 5 is the shaded area in the following figure:
Week 1 Page 5 of 19
Figure 1: The feasible region of the prototype example LP
Week 1 Page 6 of 19
other (which makes sense, since by the definition of this cocnept,
isoprofit/isocost lines cannot intersect). Hence, if we continously increase
from some initial value 0, the corresponding isoprofit lines can be obtained
by ''sliding'' the isoprofit line corresponding to f(x1, x2) = 0 parallel to itself,
in the direction of increasing or decreasing intercepts, depending on whether
c2 is positive or negative.
Week 1 Page 7 of 19
optimal solution, then there will be one which corresponds to one of the
corner points? (This argument is developed for the broader context of n-var
LP's in the next section. It is infact the Fundamental Theorem of Linear
Programming given below.)
Def.: Give a feasible region in the plane defined by or constraints. A point
of intersection of two boundary lines that is also part of the feasible region is
called a corner point (or vertex) of the feasible region. In the above, A, B,
C, D are vertices for the feasible region shaded in black.
Example 2 For the region given below
Example 3
Maximize f(x, y)=80x+70y subject to the constraints:
Week 1 Page 8 of 19
The following table contains the values of the function at the vertices:
(x,y) f(x,y)
(0,0) 0
(16,0) 1280
(14,4) 1400
(9,9) 1350
(0,12) 840
The maximum value of the function is 1400 and occurs at (14,4).
Example 4
Minimize f(x, y)=60x+30y subject to the constraints:
Consider the corresponding system of linear equations and the feasible region:
It is left as an exercise for the readers to construct a table containing all the
feasible corner points and also find the optimal corner point(s) along with the
optimum value.
Week 1 Page 9 of 19
2-var LP's with many optimal solutions
Consider our prototype example with the unit profit of item P 1 being $600
instead of $200. Under this modification, the problem isoprofit lines become:
600x1+ 400x2 = x2 = – (3 / 2)x1 + / 400
and they are parallel to the line corresponding to the first problem constraint:
3x1 + 2x2 = 120 x2 = – (3 / 2)x1 + 60
Therefore, if we try to apply the optimizing technique of the previous
paragraph in this case, we get the situation depicted below (Figure 3), i.e.,
every point in the line segment CD is an optimal point, providing the optimal
objective value of $24,000.
Week 1 Page 10 of 19
x2 20
Attempting to plot the feasible region for this new problem, we get Figure 4,
which indicates that there are no points on the (x 1, x1)-plane that satisfy all
constraints, and therefore our problem is infeasible (over-constrained).
Figure 4: An infeasible LP
Week 1 Page 11 of 19
Figure 5: An unbounded LP
It is easy to see that the feasible region of this problem is unbounded, and
furthermore, the orientation of the isoprofit lines is such that no matter how
far we ''slide'' these lines in the direction of increasing the objective function,
they will always share some points with the feasible region. Therefore, this is
an example of a (2-var) LP whose objective function can take arbitrarily large
values. Such an LP is characterized as unbounded. Notice, however, that even
though an unbounded feasible region is a necessary condition for an LP to be
unbounded, it is not sufficient; to convince yourself, try to graphically identify
the optimal solution for the above LP in the case that the objective function is
changed to: maximum f(x1, x2) = –x2.
Summarizing the above discussion, we have shown that a 2-var LP can either
have a unique optimal solution which corresponds to a ''corner'' point of
the feasible region, or
have many optimal solutions that correspond to an entire ''edge'' of the
feasible region, or
be unbounded, or
be infeasible.
In the next section, we generalize this geometrical description of the LP
solution space for the n-var LP case, and we provide a brief (informal)
derivation of the Fundamental Theorem of Linear Programming. The latter
states that if an LP has a bounded optimal solution, then it must have one
Week 1 Page 12 of 19
which is an extreme point of its feasible region. The Simplex algorithm to be
discussed in a coming section of this set of notes essentially exploits this
fundamental result to reduce the space to be searched for an optimal solution.
Remark: The above problem is a production planning problem.
Some of the other major application areas to which LP can be applied are:
Blending.
Oil refinery management.
Distribution.
Financial and economic planning.
Manpower planning.
Blast furnace burdening.
Farm planning.
We consider below few more specific examples of the types of problem that
can be formulated as LP's. Note here that the key to formulating LP's is
practice. However a useful hint is that common objectives for LP's are
minimize cost/maximize profit.
Week 1 Page 13 of 19
Production planning solution
Variables
Let:
xi be the number of units of variant i (i=1,2,3,4) made per year
Tass be the number of minutes used in assembly per year
Tpol be the number of minutes used in polishing per year
Tpac be the number of minutes used in packing per year
where xi >= 0 i=1,2,3,4 and Tass, Tpol, Tpac >= 0
Constraints
(a) operation time definition
Tass = 2x1 + 4x2 + 3x3 + 7x4 (assembly)
Tpol = 3x1 + 2x2 + 3x3 + 4x4 (polish)
Tpac = 2x1 + 3x2 + 2x3 + 5x4 (pack)
(b) operation time limits
The operation time limits depend upon the situation being considered. In the
first situation, where the maximum time that can be spent on each operation is
specified, we simply have:
Tass <= 100000 (assembly)
Tpol <= 50000 (polish)
Tpac <= 60000 (pack)
In the second situation, where the only limitation is on the total time spent on
all operations, we simply have:
Tass + Tpol + Tpac <= 210000 (total time)
Objective
Presumably to maximize profit - hence we have
maximize 1.5x1 + 2.5x2 + 3.0x3 + 4.5x4
which gives us the complete formulation of the problem.
We shall solve this particular problem later in the course.
Week 1 Page 14 of 19
ingredients and a filler to provide bulk. One kg of feed mix must contain a
minimum quantity of each of four nutrients as below:
Nutrient A B C D
gram 90 50 20 2
The ingredients have the following nutrient values and cost
A B C D Cost/kg
Ingredient 1 (gram/kg) 100 80 40 10 40
Ingredient 2 (gram/kg) 200 150 20 - 60
What should be the amounts of active ingredients and filler in one kg of feed
mix?
Constraints
nutrient constraints
100x1 + 200x2 90 (nutrient A)
80x1 + 150x2 50 (nutrient B)
40x1 + 20x2 20 (nutrient C)
10x1 2 (nutrient D)
Note the use of an inequality rather than an equality in these constraints, as we
assume that the nutrient levels we want are lower limits on the amount of
nutrient in one kg of feed mix.
balancing constraint (an implicit constraint due to the definition of the
variables)
x1 + x2 + x3 = 1
Week 1 Page 15 of 19
Objective
Presumably to minimize cost, i.e.
minimize 40x1 + 60x2
which gives us our complete LP model for the blending problem.
In case you are interested the optimal solution to this LP (solved using the
simplex method discussed very shortly – (Can you solve it graphically?)) is
x1= 0.3667, x2=0.2667 and x3=0.3667 to four decimal places.
Obvious extensions/uses for this LP model include:
increasing the number of nutrients considered,
increasing the number of possible ingredients considered - more
ingredients can never increase the overall cost (other things being
unchanged), and may lead to a decrease in overall cost,
placing both upper and lower limits on nutrients,
dealing with cost changes,
dealing with supply difficulties,
filler cost.
Blending problems of this type were, in fact, some of the earliest applications
of LP (for human nutrition during rationing) and are still widely used in the
production of animal feedstuffs.
Example 7. After a particular operation, a patient receives three different
types of painkillers: A, B, and C.
Type A rates a 2 in effectiveness, Type B rates a 2.5 in effectiveness, and
Type C rates a 3 in effectiveness. For medical reasons, the patient can receive
no more than three doses of Type A, no more than five doses of Type A and
Type C combined, and no more than seven doses of Type B and Type C
combined during a 24-hour period. How many doses of each type should be
given to the patient in a 24-hour period in order to maximize the painkilling
effect?
Sol.: x = number of doses of A
y = number of doses of B
z = number of doses of C
P = total pain killing effect
Week 1 Page 16 of 19
Exercise 1 Solve graphically
maximize f(x1, x2) = 3 x1 + x2
s.t. 2 x1 – x2 8
–x1 + x2 5
xi 0 i = 1, 2.
Exercise 2 Solve graphically
minimize f(x1, x2) = 3 x1 – x2
s.t. 2 x1 + x2 3
x1 + 2 x2 3
xi 0 i = 1, 2.
Exercise 3 Solve graphically
maximize f(x1, x2) = 2 x1 + x2
s.t. 2 x1 + x2 8
x1 + x2 5
xi 0 i = 1, 2.
Do we have a unique optimal solution? If not try to describe mathematically
all the feasible points which yield the same optimum value.
Exercise 4 Consider the following LP (Linear Program):
minimize f(x1, x2) = – x1 – x2
subject to x1 + 2x2 12
x1 + x2 8
2x1 + x2 14
x1 and x2 0.
a) Find an optimum solution of the LP by using the graphical procedure.
b) Is optimum answer of part a) unique? If not find all values of x 1 and x2
where the objective function assumes the same optimum value.
Exercise 5
A particular salad contains 4 units of vitamin A, 5 units of vitamin B-complex
and 2 mg of fat per serving. A nutritious soup contains 6 units of vitamin A, 2
units of vitamin B-complex, and 3 mg of fat per serving. If a lunch consisting
of these two foods is to have at least 10 units of vitamin A and at least 10 units
of vitamin B-complex, how many servings of each should be used in order to
minimize the total milligrams of fat?
Week 1 Page 17 of 19
Exercise 6
A farmer has 100 acres on which to plant two crops: corn and wheat. To
produce these crops, there are certain expenses, as shown in the table:
After the harvest, the farmer must usually store the crops while awaiting
favorable market conditions. Each acre yields an average of 110 bushels of
corn or 30 bushels of wheat. The limitations of resources are
Available capital: $15,000
Available storage facilities: 4000 bushels.
If the net profit (after all expenses have been subtracted) per bushel of corn is
$1.30 and for wheat is $2.00, how should the farmer plant the 100 acres to
maximize profits?
Exercise 7
Sears ships a certain air-conditioning unit from factories in Portland, Oregon,
and Flint, Michigan, to distribution centers in Los Angeles, California and
Atlanta, Georgia. The shipping costs are summarized in the table:
Week 1 Page 18 of 19
How should shipments be made from Portland and Flint to minimize the
shipping costs?
Exercise 8 Solve graphically
maximize f(x1, x2) = –2x1 – 3x2
s.t. x1 + 2x2 5
xi 0 i = 1, 2.
Exercise 9 Solve graphically
minimize f(x1, x2) = 2x1 – x2
s.t. x1 – x2 1
2x1 + x2 6
xi 0 i = 1, 2.
Exercise 10 Solve graphically
maximize f(x1, x2) = x1 + 2x2
s.t. 2x1 + x2 2
xi 0 i = 1, 2.
Week 1 Page 19 of 19