Professional Documents
Culture Documents
Opt. Lec 2
Opt. Lec 2
Lecture Two
Linear Programming and Application in Linear
Programming
2.1 Introduction
In business, it is often desirable to find the production levels that will produce
the maximum profit or the minimum cost. The production process can often be
described with a set of linear inequalities called constraints. The profit or cost
function to be maximized or minimized is called the objective function. The
process of finding the optimal levels with the system of linear inequalities is
called linear programming (as opposed to non-linear programming).
2.2 Definitions
Objective Function
The linear function (equal sign) representing cost, profit, or some other
quantity to be maximized of minimized subject to the constraints.
Constraints
A system of linear inequalities.
Problem Constraints
The linear inequalities that are derived from the application, For example,
there may be only 40 hours a machine can be used in a week, so the total time it
is used would have to be <= 40. The problem constraints are usually stated in
the story problem.
Non-Negativity Constraints
The linear inequalities x >= 0 and y >= 0. These are included because x and y
are usually the number of items produced and you cannot produce a negative
1
Fourth Stage Asst. Lecturer Ahmed Razzaq
number of items, the smallest number of items you could produce is zero. These
are not (usually) stated, they are implied.
Feasible Region
The solution to the system of linear inequalities. That is, the set of all points
that satisfy all the constraints. Only points in the feasible region can be used.
Corner Point
A vertex of the feasible region. Not every intersection of lines is a corner
point. The comer points only occur at a vertex of the feasible region. If there is
going to be an optimal solution to a linear programming problem, it will occur at
one or more corner points, or on a line segment between two comer points.
Bounded Region
A feasible region that can be enclosed in a circle. Abounded region will have
both a maximum and minimum values.
Unbounded Region
A feasible region that cannot be enclosed in a circle.
2
Fourth Stage Asst. Lecturer Ahmed Razzaq
3
Fourth Stage Asst. Lecturer Ahmed Razzaq
Geometric Approach
If the slope of the objective function is negative and you take a line with that
slope passing through the origin and move it to the right through the feasible
region, the last corner point hit by that moving line will be the maximum value.
In the example shown, the last line with slope m = - 4/3 that touches the feasible
region touches at the corner point (6, 3).
Since z=4(6) + 3(3) = 24+9 = 33, the maximum value is 33 when: x= 6 and y=3.
Algebraic Approach
Now, to verify the solution non-geometrically, since we know the optimal
solution has to occur at one or more comer points, we make a table listing all the
corner points and evaluate the objective function at those points.
As you can see, the corner point with the maximum value is at (6, 3).
4
Fourth Stage Asst. Lecturer Ahmed Razzaq
We can also determine the minimum value from that table. A suitable answer,
assuming the problem had asked for both the maximum and minimum is:
The minimum value is 0 when x = 0 and y = 0.
The maximum value is 33 when x = 6 and y = 3
Example 2.1:
Consider the problem of a toy company that produces toy planes and toy boats.
The toy company can sell its planes for $10 and its boats for $8 dollars. It costs
$3 in raw materials to make a plane and $2 in raw materials to make a boat. A
plane requires 3 hours to make and 1 hour to finish while a boat requires 1 hour
making and 2 hours to finish. The toy company knows it will not sell any more
than 35 planes per week. Further, given the number of workers, the company
cannot spend any more than 160 hours per week finishing toys and 120 hours
per week making toys, the company wishes to maximize the profit it makes by
choosing how much of each toy to produce .
Solution:
5
Fourth Stage Asst. Lecturer Ahmed Razzaq
x1 + 2x2 ≤ 160
Finally, we know that x1 ≤ 35, since the company will make no more than 35
planes per week. Thus the complete Linear Programming problem is given as:
x1 ≥ 0
x2 ≥ 0
Example 2.2:
A furniture company that makes tables and chairs, a table requires 40 board feet
of wood and a chair requires 30 board feet of wood. Wood costs $1 per board
foot and 40,000 board feet of wood are available. It takes 2 hours of skilled
labor to make an unfinished table or an unfinished chair. Three more hours of
labor will turn an unfinished table into a finished table; two more hours of labor
will turn an unfinished chair into a finished chair. There are 6000 hours of labor
available. (Assumed that do not need to pay for this labor). The prices of output
are given in the table below:
Product Price
Unfinished Table $70
Finished Table $140
Unfinished Chair $60
Finished Chair $110
We want to formulate an LP that describes the production plans that the firm can
be use to maximize its profits.
6
Fourth Stage Asst. Lecturer Ahmed Razzaq
Solution:
The relevant variables are number of finished and unfinished tables and chairs.
Let TF and TU be the number of finished and unfinished tables. Let CF and CU
be the number of finished and unfinished chairs.
The revenue (using the table):
70 TU + 140 TF + 60 CU + 110 CF
While the Cost is:
40 TU + 40 TF + 30 CU + 30 CF (because lumber costs $1 per board foot).
Profit (Revenue - Cost):
30 TU + 100 TF + 30 CU + 80 CF
The constraints are:
40 TU + 40 TF + 30 CU + 30 CF ≤ 40000
2 TU + 5 TF + 2 CU + 4 CF ≤ 6000
The first constraint says that the amount of lumber used is no more than
what is available.
The second constraint states that the amount of labor used is no more than
what is available.
Example 2.3:
A factory can produce four products denoted by P1, P2, P3 and P4 each product
must be processed in each of two workshops. The processing times (in hours per
unit produced) are given in the following table:
P1 P2 P3 P4
Workshop 1 3 4 8 6
Workshop 2 6 2 5 8
7
Fourth Stage Asst. Lecturer Ahmed Razzaq
400 hours of labor are available in each workshop. The profit margins are 4, 6,
10, and 9 dollars per unit of Pl, P2, P3, and P4 produced, respectively. Everything
that is produced can be sold.
Solution:
Maximize 4 x1 + 6 x2 +l0 x3 + 9 x4
S.t. 3 x1 + 4 x2 + 8 x3 + 6 x4 ≤ 400
6 x1 + 2 x2 + 5 x3 + 8 x4 ≤ 400
Example 2.4:
A manufacturing firm produces two machine parts wing lathes, milling
machines, and grinding machines. The different machining times required for
each part, the machining times available on different machines and the profit on
each machine part are given in the following table.
8
Fourth Stage Asst. Lecturer Ahmed Razzaq
Solution:
Let the number of machine parts I and II manufactured per week be denoted by
x and y respectively.
The total profit is given by 50 x + 100 y and the resulting algebraic formulation
is:
Maximize: Z = 50 x + 100 y
Subject to: 10 x + 5 y ≤ 2500
4 x + 10 y ≤ 2000
x + 1.5 y ≤ 450
x≥0
y≥0