OR Linear programming unit 2
OR Linear programming unit 2
2.0
2.0 OBJECTIVES AND AIMS
At the end of this chapter students will be able to apply the knowledge of linear
programming to solve managerial problems, they will be able to use linear programming
models to solve managerial problems having quantitative application.
2.1 INTRODUCTION
58
Components Assumptions
1. Objective function 1. Linearity
2. Decision variables Model 2. Divisibility
Model
3. Constraints Structure 3. Certainty Validity
4. Parameters and Right. 4. Non-negativity
Hand Side Values
59
d) 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:
Maximize:
Maximize: 4X1 + 7X2 + 5X3 (profit)… objective function subject to
2X1 + 3X2 + 6X3 300 labor hrs
5X1 + 4X3 200 raw mata. System
Constraints
3X1 + 5X2 + 2X3 360
X1 = 30 Individual
X1 – qty of product 1 X2 40 Constraints
Variables
Decision
System constraints-
constraints- involve more than one decision variables
Individual constraint-
constraint- involve only one decision variable.
None-negativity constrains-
constrains- specify that no variable will be allowed to take on a negative
value. The non negativity constraints typically apply in an LP model, whether they are
explicitly stated or not.
60
c) Certainty: The parameters are known and constant. The certainty requirement
involves two aspects of LP models. The constraint equations do not change.
(1) With respect to model parameters (i.e. the numerical values) –If is assumed that
these values are known and constant. Eg. In the above example each unit of product
1 requires 2 labor hours is known and remain constant, and also the 300 labor
available is deemed to be known and constant.
(2) All the relevant constraints identified and represented in the model are as they are.
d) Non-negativity-
Non-negativity- The non-negativity constraint is that negative values of variables are
unrealistic and, therefore, will not be considered in any potential solutions, only positive
values and zero will be allowed.
Once a problem has been defined, the attention of the analyst shifts to formulating a
model. Just as 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 lend to poor
decisions.
61
- non-negativity constraints.
Additional information
In order to develop a suitable model of the problem, the manager has met with the design
and manufacturing personnel. As a result of these meetings, the manager has obtained the
following information:
Type 1 Type 2
Profit per unit $ 60 $ 50
Assembly time per unit 4hrs 10hrs
Inspection time per unit 2hrs 1hr
Storage space per unit 3 cubic ft 3 cubic ft
The manager also has acquired information on the available company resources. These
(weekly) amounts are:
Resource Resource available
Assembly time 100hrs
Inspection time 22hrs
Storage space 39cubic feet
The manager has also met with the firms marketing manager and learned that demand for
the micro computers was such that what ever combination of these two types of micro
computers is produced, all of the out put can be sold.
Step 1:
1: Problem definition
62
- To determine the no. of two types of microcomputers to be produced (and sold)
per week so as to maximize the weekly profit given the restrictions.
63
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 br.
8.25 per unit, Model B a profit of br 7.5 per unit and model C a profit of Br 7.8 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.
Required. Formulate the linear programming model of this problem.
Solution for check your progress question number 2.
Step 1: Problem definition: to determine the number of three types of searching devices
to be produced and sold for the next 5 days (working) so as to maximize the 5 days profit.
2. Variable representation
Let X1, X2, and X3 be the number of model A, B and C sketching devices to be produced
and sold.
4. Constraint identification
2.5X1 + 1.8X2 + 2.0X3 450minutes…Assembly time station 1 System
Constraints
3.0X1 + 1.6X2 + 2.2X3 450minutes…. Assembly time station2
X1 20 …. Model A
Individual
X2 20 ….Model B Constraints
X3 20….Model C
X1, X2, X3 0 ….no negativity
Summary
Z max = 8.25X1 + 7.50X2 + 7.8X3
Subject to: 2.5X1 + 1.8X2 + 2X3 450
3X1 + 1.6X2 + 2.2X3 450
X1 20
X2 20
64
X3 20
X1 X2 X3 0
This method can be used only to solve problems that involve two decision variables.
However, most linear programming applications involve situations that have more than
two decision variables, so the graphic approach is not used to solve these.
Steps
1. Plot each of the constraints and identify its region.
2. Identify the common region, which is all area that contains all of the points that
satisfy the entire set of constraints.
3. Determine the optimal solution-identify the point which lead to maximum benefit
or minimum cost.
65
4X1 + 10X2 = 100 2X1 + X2 = 22 3X1 + 3X2 = 39
X1 0 25 X1 0 11 X1 0 13
X2 10 0 X2 22 0 X2 13 0
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 any consider the extreme points
because one of those must be optimal. Further, 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) of the objective function. Extreme points represent interactions of
constraints.
Determine the values of the decision variables at each corner point. Some times, this can
be done by impaction (observation) and sometimes by simultaneous equation.
66
Substitute the value of the decision variables at each corner point into the objective
function to obtain its value 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.
Value of the obi
Corner Coordinates How function Z = 60X1 + 50X2
Points X1 X2 determined?
A 0 0 observation 0 br
B 11 0 observation 660 br
C 9 4 Simultaneous 740 br
equation
D 5 8 Simultaneous 700 br
equation
E 0 10 Observation 500 br
Basic Solution
X1 = 9 X2 = 4 Z = 740 Br.
After we have got the optimal solution,
solution, we have to substitute the value of the decision
variables into the constraints and check whether all the resources available are used or
not. If there are any unused resources we can use it for any other purpose. The amount of
unused resource is known as slack-
slack- the amount of a scarce resource that is unused by a
given solution. The slack can range from zero, for a case in which all of a particular
resource is used; to the original amount of the resource that was available (i.e. none of it
is used.)
Constraint X1 = 9X2 = 4
Assembly 4(9) + 10(4) = 76 100 100 – 76 = 24 hrs
Inspection 2(9) + 1(4) = 22 22 22 – 22 = 0 hr
Storage 3(9) + 3(4) = 39 39 39 – 39 = 0 hr
67
Constraints that have no slack are sometimes referred to as binding constraints since they
limit or bind the solution. In the above cases, 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 remaining assembly time for other products, or, perhaps to schedule equipment
maintenance, safety seminars, training sermons or other activities
Interpretation: The company is advised to produce 9 units of type 1 micro computer and 4
units of type 2 micro computers per week to maximize its early profit to Br. 740, and in
doing so the company would be left with unused resource of 24 assembly hrs which can
be used for other purposes.
12
8
A
4 B
0 C X1
4 8 12 16
68
A 0 9.67 Observation 77.3 br.
B 5 3 Simul. equn. 49 br.
C 14 0 Observation 70 br.
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 optimum 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 optimal solution to a linear programming model will occur at an extreme point of the
feasible solution space. This is true even if a model involves more than two variables;
optimal solutions will occur at these points of the feasible solution space; some will be
outside of the feasible solution space. Hence, not every solution will be a feasible
solution. Solutions which represent infasseetwim of constraints are called basic solutions;
solutions;
those which also satisfy all of the constraints, including the non-negativity constraints,
are called basic feasible solutions. The simplex method is an algebraic procedure for
systematically examining basic feasible solutions. If an optimal solution exists, the
simplex method will identify it. # of basic solution n + mCm not all basic solutions are
feasible.
69
The simplex procedure for a maximization problem with all constraints consists of the
following steps.
1. Write the LPM in a Standard form: When all of the constraints are written as
equalities, the LP program is said to be in a 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, s 1 refers to the amount of slack in
the first constraint, S2 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
b/c the slack variable accounts, they become equalities. Further more, 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.
Slack = Requirement – Production surplus =Production – Requirement
Taking the microcomputer problem, its standard form is as follow s
Z max = 60X1 + 50X2 Z max = 60X1 + 50X2 + 0S1 + 0S2 + 0S3
4X1 + 10X2 100 4X1 + 10X2 + S1 = 100
2X1 + X2 22 2X1 + X2 + S2 = 22
3X1 + 3X2 39 3X1 + 3X2 + S3 = 39
X1, X2 0 All variables 0
(X1, X2, S1, S2, S3 0)
2. Develop the initial tableau
a. List the variables across the top of the table and write the objective function
coefficient of each variables just above it.
b. There should be one row in the body of the table for each constraint. List the slack
variables in the basis column, one per row.
c. In the Cj column, enter the objective function coefficient of zero for each slack
variable.
d. Compute values for row Zj. Cj = Coeff of variable J in the obj function.
Solution Cj 60 50 0 0 0 100/4 = 25
leaving
Basis X1 X2 S1 S2 S3 RHSV 22/2 = 11
39/3 = 13
70
S1 0 4 10 1 0 0 100
S2 0 2 1 0 1 0 22
S3 0 3 3 0 0 1 39
Zj 0 0 0 0 0 0
Cj - Zj 60 50 0 0 0
Initial feasible solution
S1 = 100 Obtained by
Entering variable S2 = 22 equating tow
S3 =39 Variables to
X1 = 0 Zero
X2 = 0 Decision
Z = 0 Variable
3. Develop subsequent tables
3.1 Identify the entry variable –variable that has a largest positive value in the Cj – Zj
row.
3.2 Identify the leaving variable –using the constraint coefficient or substitution rates
in the entering variable column divide each one into the corresponding quantity value.
However do not divide by a zero or negative value. The smalls non negative ratio that
results indicate which variable will leave the solution
4. Find unique vectors for the new basic variable using row operations on the pivot
element.
-1/2 R21 –4R2new + R1old, -3R2new + R3old
Solution Cj 60 50 0 0 0
Cj = bi/xj (aij)
Basics X1 X2 S1 S2 S3 RHSV
56/8 = 7
11/1/2 = 22
S1 0 0 8 1 -2 0 56 6/3/2 = 4
X1 60 1 ½ 0 ½ 0 11
S3 0 0 3/2 0 -3/2 1 6
Zs 60 30 0 30 0 660
Cj – Zj 0 20 0 -30 0
Incoming Variable
Solution Cj 60 50 0 0 0 RHSV
basis X1 X2 S1 S2 S3
S1 0 0 0 1 6 -16/3 24
X1 60 1 0 0 1 -1/3 9
71
X2 50 0 1 0 -1 2/3 4
Zj 60 50 0 10 40/3 740
Opportunity cost
Cj - Zj 0 0 0 -10 -40/3
5. Compute Cj – Zj row
6. If all Cj – Zj Values are zeros and negatives, you have reached optimality
7. If this is not the case (step 6), repeat 2 to 5 until you get optional solution.
“A simplex solution in a maximization problem in optional if the Cj – Zj row consists
entirely of zeros and negative numbers (i.e. there are no positive values in the bottom
row.)”
Note: The variables in solution all have unit vectors in their respective columns for
the constraint equations. Further, note that a zero appears in row C – Z in every
column whose variable is in solution, in row C – Z in every column whose variable is
in solution, indicating that its maximum contribution to the objective function has
been realized.
2.7 SOME SPECIAL ISSUES IN SIMPLEX ALGORITHM
During the course of solving linear programming problems, various conditions can occur
that make the problem unusual and, in some instances, impossible to solve. In this
section, some of these special issues are examined: unbounded solution, degeneracy,
multiple optimal solution and infeasibility.
Unbounded Solutions
A solution is unbounded if the objective function can be improved without limit. The
condition is relatively easy to recognize in a simplex solution. Recall that the way to
determine which variable will leave an interim solution is to compute the ratios of values
in the quantity column and values in the pivot/key column. The variable with the smallest
positive ratio will leave the solution. The solution is unbounded if there are not positive
ratios. A negative ratio means that increasing a certain decision variable would increase
resources! A zero ratio means that incasing a decision variable would not use any
resources.
72
This condition generally arises because the problem is incorrectly formulated. If the
constraints do not properly bound the solution, or the objective function is stated as
maximization when it should be a minimization, unbounded solutions will occur.
Degeneracy
In the process of developing the next simplex tableau for a tableau that is not optimal, the
leaving variable must be identified. This is normally done by computing the ratios of
values in the quantity column the corresponding row values in the entering variable
column, and selecting the variable whose row has the smallest non-negative ratio. In
some cases, there will be a tie for the lowest non-negative ratio. Such occurrence is
referred to as degeneracy. It is theoretically possible for subsequent solutions to cycle
(i.e., to return to previous solutions). There are ways of dealing with ties in a specific
fashion; however, it will usually suffice to simply select one row (variable) arbitrarily and
proceed with the computations.
Multiple Optimal Solutions
As we learned in the previous section, some linear programming problems have multiple
optimal solutions. That is, the same maximum value of the objective function might be
possible with a number of different combinations of values of the decision variables. This
occurs because the objective function is parallel to a binding constraint. In effect, the two
corner points for the segment of the constraint that borders the feasible solution space and
all points in between which lie on the constraint are optimal solution. In graphical
solution, this condition is readily apparent. With simplex, this condition can be detected
by examining the C-Z row of the final tableau. If a zero appears in the column of a non-
basic variable (i.e., a variable that is not in a solution). It can be concluded that an
alternate solution exists.
73