Chapter Three 1
Chapter Three 1
CHAPTER III
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
1
Chapter III: Introduction to Linear Programming 2
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:
2
Chapter III: Introduction to Linear Programming 3
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
3
Chapter III: Introduction to Linear Programming 4
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
4
Chapter III: Introduction to Linear Programming 5
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
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:
5
Chapter III: Introduction to Linear Programming 6
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:
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.
6
Chapter III: Introduction to Linear Programming 7
Solution:
In summary:
7
Chapter III: Introduction to Linear Programming 8
3. A diet is to include at least 140 mgs of vitamin A and at least 145 Mgs of vitamin
B. These requirements are to be obtained from two types of foods: Type 1 and
Type 2. Type 1 food contains 10Mgs of vitamin A and 20mgs of vitamin B per
pound. Type 2 food contains 30mgs of vitamin A and 15 mgs of vitamin B per
pound. If type 1 and 2 foods cost Birr 5 and Birr 8 per pound respectively, how
many pounds of each type should be purchased to satisfy the requirements at a
minimum cost?
Vitamins
Foods A B
Type 1 10 20
Type 2 30 15
Solution:
4. Constraints
4. A farm consists of 600 hectares of land of which 500 hectares will be planted with
corn, barley and wheat, according to these conditions.
8
Chapter III: Introduction to Linear Programming 9
It costs Birr 20 per hectar to plant corn, Birr 15 per hectar to plant barley and Birr
12 per hectar to plant wheat.
Solution:
Step 4. Constraints
X1 + X2 + X3 = 500
X1 250
X2 200
X1 – 2X2 =0
X1, X2, X3 0
In summary
9
Chapter III: Introduction to Linear Programming 10
1. Plot each of the constraints and identify its region – make linear
inequalities linear equations.
2. Identify the common region, which is an area that contains all of the
points that satisfy the entire set of constraints.
3. Determine the Optimal solution- identify the point which leads to
maximum benefit or minimum cost.
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
10
Chapter III: Introduction to Linear Programming 11
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;
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.
Basic solution
X1 = 9
X2 = 4
Z = Birr 740
After we have got the optimal solution, we have to substitute the value of the
decision variables into the constraints and check whether all the resources
11
Chapter III: Introduction to Linear Programming 12
available were used or not. If there is an unused resource we can use it for any
other purpose. The amount of unused resources is known as SLACK-the amount
of the 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).
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.
12
Chapter III: Introduction to Linear Programming 13
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.
13
Chapter III: Introduction to Linear Programming 14
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, S 1 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.
14
Chapter III: Introduction to Linear Programming 15
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.
2. Develop the initial tableau: the initial tableau always represents the “Do
Nothing” strategy, so that the decision variables are initially non-basic.
a) List the variables across the top of the table and write the
objective function coefficient of each variable jut 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 raw.
c) In the Cj column, enter the objective function coefficient of
zero for each slack variable. (Cj - coefficient of variable j in the objective
function)
d) Compute values for row Zj
e) Compute values for Cj – Zj.
Sol/n Cj 60 50 0 0 0
basis X1 X2 S1 S2 S3 RHSV Øj = bj/xj (aij)
S1 0 4 10 1 0 0 100 100/4 = 25
S2 0 2* 1 0 1 0 22 22/2 = 11 Leaving
S3 0 3 3 0 0 1 39 39/3 = 13 variable
Zj 0 0 0 0 0 0
Cj-Zj 60 50 0 0 0 0
15
Chapter III: Introduction to Linear Programming 16
3.1. Identify the entering variable - a variable that has a largest positive
value is the Cj – Zj raw.
3.2. Identify the leaving variable - Using the constraint coefficients 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 smallest 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.
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
16
Chapter III: Introduction to Linear Programming 17
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
17
Chapter III: Introduction to Linear Programming 18
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 Leaving
S3 0 1 1 0 0 1 75 75/1 = 75 variable
Zj 0 0 0 0 0 0
Cj-Zj 45 70 0 0 0
Entering variable
Sol/n Cj 45 70 0 0 0
basis X1 X2 S1 S2 S3 RHSV Øj = bj/xj (aij)
S1 0 5 0 1 -2 0 120 120/5 = 24 Leaving
X2 70 1/3 1 0 1/6 0 50 50/. 333 =150 variable
S3 0 2/3 0 0 -1/6 1 25 25/.666 = 75
Zj 70/3 70 0 70/6 0 3500
Cj-Zj 65/3 0 0 -70/6 0
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
18
Chapter III: Introduction to Linear Programming 19
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.
19
Chapter III: Introduction to Linear Programming 20
1. Unbounded solutions
A solution is unbounded if the objective function can be improved without limit.
The solution is unbounded if there are no positive ratios in determining the
leaving variable. A negative ratio means that increasing a basic variable would
increase resources! A zero ratio means that increasing a basic variable would not
use any resources. This condition generally arises because the problem is
incorrectly formulated. For example, if the objective function is stated as
maximization when it should be a minimization, if a constraint is stated when
it should be, or vice versa.
20
Chapter III: Introduction to Linear Programming 21
The other optimal corner point can be determined by entering the non-basic
variable with the C - Z equal to zero and, then, finding the leaving variable in the
usual way.
3. 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 and the corresponding
row values in the entering variable column, and selecting the variable whose row
has the smallest non-negative ratio. Such an occurrence is referred to degeneracy,
because 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.
21