CHAPTER III Introduction to Linear Programming
CHAPTER III Introduction to Linear Programming
The goal in linear programming is to find the best solution given the constraints
imposed by the problem; hence the term constrained optimization.
Components Assumptions
1. Objective function 1. Linearity
2. Decision variables Model 2. Divisibility Model
3. Constraints Structure 3. Certainty Validity
4. Parameters & RHSV 4. Non-negativity
Components of LP model
Since the decision maker has freedom of choice among actions, these decision
variables are controllable variables.
3. The constraints - are restrictions which define or limit the feasibility of a
proposed course of action. They limit the degree to which the objective can
be pursued.
Atypical restriction embodies scarce resources (such as labor supply, raw materials,
production capacity, machine time, storage space), legal or contractual requirements
(e.g. Product standards, work standards), or they may reflect other limits based on
forecasts, customer orders, company policies etc.
4. Parameters - are fixed values that specify the impact that one unit of each
decision variable will have on the objective and on any constraint it pertains
to as well as to the numerical value of each constraint.
➢ The components are the building blocks of an LP model. We can better
understand their meaning by examining a simple LP model as follows.
Example:
Formulating LP Models
Once a problem has been defined, the attention of the analyst shifts to formulating
a model. Just as it is important to carefully define a problem, it is important to
carefully formulate the model that will be used to solve the problem. If the LP
model is ill formulated, ill-structured, it can easily lead to poor decisions.
Note: a. The units of all the coefficients in the objective function must be the
same. E.g. If the contribution of type 1 is in terms of Br so does for
type 2.
b. All terms in the objective function must include a variable each term
have to have 1 variable.
c. All decision variables must be represented in the objective function.
Example
Additional information
In order to develop a suitable model of the problem, the manager has met with
design and manufacturing personnel. As a result of these meetings, the manger
has obtained the following information:
Type 1 Type 2
Profit per unit Birr 60 Birr 50
Assembly time per unit 4hrs 10hrs
Inspection time per unit 2hrs 1hr
Storage space per unit 3cubic ft 3cubic ft
The manger also meet with the firm’s marketing manger and learned that demand
for the microcomputers was such that whatever combination of these two types of
microcomputer is produced, all of the output can be sold.
Solution:
Step 1: Problem Definition
- To determine the number of two types of microcomputers to be
produced (and sold) per week so as to maximize the weekly profit
given the restriction.
Step 2: Variable Representation
- Let X1 and X2 be the weekly quantities of type 1 and type 2
microcomputers, respectively.
Individual constraint No
Non-negativity constraint X1, X2 0
2. An electronics firm produces three types of switching devices. Each type involves
a two-step assembly operation. The assembly times are shown in the following
table:
Assembly time per Unit (in minutes)
Section #1 Section #2
Model A 2.5 3.0
Model B 1.8 1.6
Model C 2.0 2.2
Each workstation has a daily working time of 7.5 hrs. The manager wants to obtain
the greatest possible profit during the next five working days. Model A yields a
profit of Birr 8.25 per unit, Model B a profit of Birr 7.50 per unit and Model C a
profit of Birr 7.80 per unit. Assume that the firm can sell all it produces during this
time, but it must fill outstanding orders for 20 units of each model type.
Required: Formulate the linear programming model of this problem.
Solution:
Step 1. Problem definition
To determine the number of three types of switching devices to be
produced and sold for the next 5 working days so as to maximize the 5
days profit.
Step 2. Variable representation
Let X1, X2 and X3 be the number of Model A, B and C switching devices
respectively, to be produced and sold.
Step 3. Develop objective function
Zmax: 8.25X1 + 7.50X2 + 7.80X3
Step 4. Constraint identification
2.5X1 + 1.8X2 + 2.0X3 2250 minutes Ass. time station 1 System
3.0X1 + 1.6X2 + 2.2X3 2250 minutes Ass. time station 2
X1 20 Model A
X2 20 Model B Individual constraint
X3 20 Model C
X1, X2, X3 0 Non negativity
In summary:
24
22 2X1 + X2 = 22
20
16
3X1 + 3X2 = 39
12
(0, 13) E
8
(5, 8) D 4X1 + 10X2 = 100
4 (9, 4) C
(0, 0) A 4 8 B 12 16 20 24 28
To identify the maximum (minimum) value we use the corner point approach or
the extreme point approach. The corner point/extreme point approach has one
theorem: It states that;
For problems that have optimal solutions, a solution will occur at an
extreme, or corner point. Thus, if a problem has a single optimal solution,
it will occur at a corner point. If it has multiple optimal solutions, at least
one will occur at a corner point. Consequently, in searching for an optimal
solution to a problem, we need only consider the extreme points because
one of those must be optimal. Further, by determining the value of the
objective function at each corner point, we could identify the optimal
solution by selecting the corner point that has the best value (i.e., maximum
or minimum, depending on the optimization case) at the objective function.
Determine the values of the decision variables at each corner point. Sometimes,
this can be done by inspection (observation) and sometimes by simultaneous
equation.
Substitute the value of the decision variables at each corner point.
After all corner points have been so evaluated, select the one with the highest
or lowest value depending on the optimization case.
Constraints that have no slack are some time referred to as binding constraints
since they limit or bind the solution. In the above case, inspection time and storage
space are binding constraints; while assembly time has slack.
Knowledge of unused capacity can be useful for planning. A manager may be able
to use the assembly time for other products, or, perhaps to schedule equipment
maintenance, safety seminars, training sessions or other activities.
Interpretation: The Company is advised to produce9 units of type 1
microcomputers and 4 units of type 2 microcomputers per week to maximize his
weekly profit to Birr 740; and in do so the company would be left with unused
resource of 24-assembly hrs that can be used for other purposes.
2. Solving the diet problem with graphic approach
Cmin: 5X1 + 8X2
10X1 + 30X2 140
20X1 + 15X2 145
X1, X2 0
16
12
20X1 + 15X2 = 145
(0, 9.67) A
8
C (14,0)
4 8 12 16 20
If there is a difference between the minimum required amount and the optimal
solution, we call the difference surplus: That is, Surplus is the amount by which the
optimal solution causes a constraint to exceed the required minimum amount. It
can be determined in the same way that slack can: substitute the optimal values of
the decision variables into the left side of the constraint and solve. The difference
between the resulting value and the original right-hand side amount is the amount
of surplus. Surplus can potentially occur in a constraint.
The simplex method is an iterative technique that begins with a feasible solution
that is not optimal, but serves as a starting point. Through algebraic manipulation,
the solution is improved until no further improvement is possible (i.e., until the
optimal solution has been identified). Each iteration moves one step closer to the
optimal solution. In each iteration, one variable that is not in the solution is added
to the solution and one variable that is in the solution is removed from the solution
in order to keep the number of variables in the basis equal to the number of
constraints.
1. Write the LPM in a standard form: when all of the constraints are written
as equalities, the linear program is said to be in standard form. We convert
the LPM in to a standard form by applying the slack variables, S, which
carries a subscript that denotes which constraint it applies to. For example,
S1 refers to the amount of slack in the first constraint, S 2 to the amount of
slack in the second constraint, and so on. When slack variables are
introduced to the constraints, they are no longer inequalities because the
slack variable accounts for any difference between the left and right-hand
sides of an expression. Hence, once slack variables are added to the
constraints, they become equalities. Furthermore, every variable in a model
must be represented in the objective function. However, since slack does
not provide any real contribution to the objective, each slack variable is
assigned a coefficient of zero in the objective function.
3. Find unique vectors for the new basic variable using row operations
on the pivot element.
Sol/n Cj 60 50 0 0 0
basis X1 X2 S1 S2 S3 RHSV Øj = bj/xj (aij)
S1 0 0 8 1 -2 0 56 56/8 = 7
X1 60 1 1/2 0 1/2 0 11 11/. 5 = 22
S3 0 0 3/2 0 -3/2 1 6 6/1.5 = 4
Zj 60 30 0 30 0 660
Cj-Zj 0 20 0 -30 0 0
Leaving variable
Entering Variable
Sol/n Cj 60 50 0 0 0
basis X1 X2 S1 S2 S3 RHSV Øj = bj/xj (aij)
S1 0 0 0 1 6 -16/3 24
X1 60 1 0 0 1 -1/3 9
X2 50 0 1 0 -1 2/3 4
Zj 60 50 0 10 40/3 740
Cj-Zj 0 0 0 -10 -40/3
Optimal solution: X1 = 9
X2 = 4
S1 = 24 hrs
Z = Birr 740
Note: The variables in solution all have unit vectors in their respective columns
for the constraint equations. Further, note that a zero appears is raw c - z in every
column whose variable is in solution, indicating that its maximum contribution
to the objective function has been realized.
Example 2
A manufacturer of lawn and garden equipment makes two basic types of lawn
mowers: a push-type and a self-propelled model. The push-type requires 9
minutes to assemble and 2 minutes to package; the self-propelled mower requires
12 minutes to assemble and 6 minutes to package. Each type has an engine. The
company has 12 hrs of assembly time available, 75 engines, and 5hrs of packing
time. Profits are Birr 70 for the self-propelled models and Birr 45 for the push-type
mower per unit.
Required:
1. Formulate the linear programming models for this problem.
2. Determined how many mower of each type to make in order to maximize
the total profit (use the simplex procedure).
Solution:
1.
a) To determine ho many units of each types of mowers to produce so as to
maximize profit.
b) Let X1 - be push type mower.
X2 - be self-propelled mower.
c) Determine the objective function
Zmax = 45X1 + 70X2
d) Identify constraints
9X1 + 12X2 720 minutes Assembly time
2X1 + 6X2 300 minutes packing time
X1 + X2 75 engines Engines
X1, X2 0
In summary:
Zmax = 45X1 + 70X2
: 9X1 + 12X2 720
2X1 + 6X2 300
X1 + X2 75
X1, X2 0
2.
a. Write the LPM in a standard form
Sol/n Cj 45 70 0 0 0
basis X1 X2 S1 S2 S3 RHSV Øj = bj/xj (aij)
S1 0 9 12 1 0 0 720 720/12 =60
S2 0 2 6 0 1 0 300 300/6 =50
S3 0 1 1 0 0 1 75 75/1 = 75
Zj 0 0 0 0 0 0
Cj-Zj 45 70 0 0 0
Leaving variable
Entering variable
Entering variable
Sol/n Cj 45 70 0 0 0
basis X1 X2 S1 S2 S3 RHSV Øj = bj/xj (aij)
X1 45 1 0 1/5 -2/5 0 24
X2 70 0 1 -1/15 3/10 0 42
S3 0 0 0 -2/15 1/10 1 9
Zj 45 70 13/3 3 0 4020
Cj-Zj 0 0 -13/3 -3 0
During a given week, the assembly and inspection departments have available at
most 1500 and 1200 person-hours, respectively. if the unit profits for products A,
B, and C are Birr 50, Birr 40, and Birr 60, respectively, determine the number of
units of each product that should be produced in order to maximize the total profit
and satisfy the constraints of the problem.
Answer: 0 unit of product A, 0 unit of product B, 750 units of product C, unused
inspection time of 450 hours, and a maximum profit, Z ,of Birr 45,000.
4. The state chairman of a political party must allocate an advertising budget of birr
3,000,000 among three media: radio, television, and newspapers. The expected
number of votes gained per birr spent on each advertising medium is given below.
Expected votes per Birr spent
Radio Television Newspapers
3 5 2
Since these data are valid with in the limited amounts spent on each medium, the
chairman has imposed the following restrictions:
No more than Birr 500,000 may be spent on television ads.
No more than Birr 1,200,000 may be spent on radio ads.
No more than Birr 2,400,000 may be spent on television and newspaper ads
combined.
How much should be spent on each medium in order to maximize the expected
number of votes gained?
Answer: Birr 500,000 should be spent on radio ads.
Birr 1,200,000 should be spent on television ads.
Birr 1,200,000 should be spent on newspaper ads.
Slack in the budget constraint is Birr 100,000.
Z = 9,900,000 is the maximum expected number of votes gained.
Limitations of linear programming
1. In linear programming uncertainty is not allowed, i.e., LP methods are
applicable only when values for costs, constraints, etc. are known, but in
real life such factors may be unknown.
2. According to the LP problem, the solution variables can have any value,
whereas sometimes it happens that some of the variables can have only
integral values. For example, in finding how may machines to be produced;
only integral values of decision variables are meaningful. Except when the
variables have large values, rounding the solution to the nearest integer will
not yield an optimal solution. Such situations justify the use of Integer
Programming.
3. Many times, it is not possible to express both the objective function and
constraints in linear form.