0% found this document useful (0 votes)
15 views100 pages

Or Chapter 2

Uploaded by

wakjiradereje1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views100 pages

Or Chapter 2

Uploaded by

wakjiradereje1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 100

Chapter Two

Linear Programming

Chala B. RVU nad GLC


Linear Programming
Developed in 1947 by George
Danzig
A family of mathematical
techniques (algorithms) that can
be used for constrained
optimization problems with
linear relationships.
The problems must involve a
single objective, a linear
objective function, and linear
Constrained optimization
A form of decision making that involves
situations in which the set of acceptable
solutions is somehow restricted.
Finding the optimal solution to a problem
given that certain constraints must be
satisfied by the solution.
Recognizes scarcity—the limitations on the
availability of physical and human
resources.
Seeks solutions that are both efficient and
feasible in the allocation of resources.
Characteristics of LP Models

Components
 Objective
 Decision Variables
 Constraints
 Parameters

Assumptions
 Linearity
 Divisibility
 Certainty
 Non-negativity
Objective and Objective Function

The objective in problem solving is the


criterion by which all decisions are evaluated.
It provides the focus for problem solving.
In linear programming models, a single,
quantifiable objective must be specified by
the decision maker.
An LP model consists of a mathematical
statement of the objective called the objective
function.
Decision variables

They represent unknown quantities to be


solved for.
Constraints

 The restrictions may reflect availabilities of resources


(e.g., raw materials, labor time, etc.), legal or
contractual requirements (e.g., product standards,
work standards, etc.), technological requirements (e.g.,
necessary compressive strength or tensile strength) or
they may reflect other limits based on forecasts,
customer orders, company policies, and so on.
 In LP model, the restrictions are referred to as
constraints.
 Only solutions that satisfy all constraints in a model are
acceptable and are referred to as feasible solutions.
 The optimal solution will be the one that provides the
best value for the objective function.
Cont’d
Generally speaking, a constraint has four elements:
 A right hand side (RHS) quantity that specifies the
limit for that constraint. It must be a constant, not a
variable.
 An algebraic sign that indicates whether the limit is
an upper bound that cannot be exceeded, a lower
bound that is the lowest acceptable amount, or an
equality that must be met exactly.
 The decision variables to which the constraint applies.
 The impact that one unit of each decision variable will
have on the right-hand side quantity of the constraint.
Cont’d
Constraints can be arranged into three groups:
 System constraints – involve more than one
decision variable,
 Individual constraints – involve only one
variable,
 Non-negativity constraints – specify that no
variable will be allowed to take on a negative
value.
NB: The non-negativity constraints typically
apply in an LP model, whether they are
explicitly stated or not.
Parameters

The objective function and the constraints


consist of symbols that represent the decision
variables (e.g., X1, X2, etc.) and numerical
values called parameters.
The following simple example illustrates the components of LP models:

X1= quantity of product 1


X2 = quantity of product 2 Decision Variables
X3= quantity of product 3

Maximize Z = 4x1+7x2+5x3 (profit) Objective Function

Subject to: 2x1 + 3x2 <= 300 labor hours


5x1+ 4x3 <=200lb raw material A System
Constraint
3x1 + 5x2+2x3<= 360raw material B

X1 =30units
X2 >= 40 units Individual Constraint

X1,x2,x3 >= 0 Non negativity


constraint
ASSUMPTIONS OF LP
MODELS
The linearity requirement is that each
decision variable has a linear impact on the
objective function and in each constraint in
which it appears.
In terms of a mathematical model, a function
or equation is linear when the variables
included are all to the power 1 (not squared,
cubed, square root, etc.) and no products
(e.g., x1x2) appear.

11/17/2024 Aa)
Divisibility (Continuity)

 The divisibility requirement pertains to potential values of


decision variables.
 It is assumed that non-integer values are acceptable.
 However, if the problem concerns, for example, the optimal
number of houses to construct, 3.5 do not appear to be
acceptable.
 Instead, that type of problem would seem to require strictly
integer solutions. In such cases, integer-programming methods
should be used.
 It should be noted, however, that some obvious integer type
situations could be handled under the assumption of divisibility.
 For instance, suppose 3.5 to be the optimal number of
television sets to produce per hour, which is unacceptable, but
it would result in 7 sets per two hours, which would then be
McGra
acceptable.
w-
Abera 11/17/2024 Hill/
Irwin
Certainty

This requirement involves two aspects of LP


models.
1) One aspect relates to the model parameters,
i.e., the numerical values. It is assumed that
these values are known and constant.
 In practice, production times and other parameters
may not be truly constant. Therefore, the model
builder must make an assessment as to the degree
to which the certainty requirement is met.
2) The other aspect is the assumption that all
relevant constraints have been identified and
represented in the model. McGra
w-
Abera Abebe 11/17/2024 Hill/
Irwin
Additivity

The value of the objective function and the


total amount of each resource used (or
supplied), must be equal to the sum of the
respective individual contributions (profit or
cost) by decision variables.
 For example,
 the total profit earned from the sale of two
products A and B must be equal to the sum of
the profits earned separately from A and B.
 Similarly, the amount of a resource consumed
for producing A and B must be equal to the
McGra
sum of resources used for A and B respectively. w-
Abera A 11/17/2024 Hill/
Irwin
Non-negativity

It assumes 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 and
the non-negativity assumption is inherent in
LP models.

McGra
Abera 11/17/2024
wHill/
Irwin
3–16
Formulating LP Models
Formulating linear programming models
involves the following steps:
1. Define the decision variables
2. Determine the objective function
3. Identify the constraints
4. Determine appropriate values for
parameters
5. Use this information to build a model
6. Validate the model
Example
Example 11
 A firm that assembles computers and computer
equipment is about to start production of two new
types of computers. Each type will require assembly
time, inspection time and storage space. The
amounts of each of these resources that can be
devoted to the production of the computers is
limited. The manager of the firm would like to
determine the quantity of each computer to produce
in order to maximize the profit generated by sales of
these computers.
 In order to develop a suitable model of the problem,
the manager has met with design and production
personnel. As a result of those meetings, the
manager has obtained the following information:
The manager also has acquired information
on the availability of company resources.
These (daily) amounts are as follows:

The manager met with the firm’s marketing


manager and learned that demand for the
computers was such that whatever
combination of these two types of computers
is produced, all of the output can be sold.
Solution
x1 = quantity of type 1 computer to
produce
x2 = quantity of type 2 computer to
Maximize Z = 60x1+50x2
produce
Subject to:
Linear Programming Applications
 There are a wide range of problems that lend
themselves to solution by linear programming
techniques. Some of the applications are the following:
 Product Mix: The basic question that can be answered
using linear programming is: What mix of output will
maximize profit given the availability of scarce
resources?
 Diet Problems: This type of problem usually involves
the mixing of raw materials or other ingredients to
obtain end product that has certain characteristics.
 Portfolio Selection: these problems generally involve
allocating a fixed amount of money among a variety of
investments, such as bonds, stocks, real estate, and so
on
Diet Problems
South Meat Packing Company produces a hotdog
mixture in 1,000-gram batches. The mixture
contains two ingredients: chicken and beef. The
cost per gram of chicken is Br. 3.00 per gram and
the cost per gram of beef is Br. 5.00 per gram.
Each batch has the following recipe requirements:
 At least 500 grams of chicken
 At least 200 grams of beef
 The ratio of chicken to beef must be at least 2 to 1.
The company wants to know the optimal mixture
of ingredients that will minimize cost. Formulate a
linear programming model for this problem.
Portfolio Selection
 An individual investor has Birr 70,000 to divide among
several investments. The alternative investments are gov.
bonds with an 8.5% return, certificates of deposits with a
10% return, Treasury bill with a 6.5% return, and income
bonds with a 13% return. The amount of time until maturity
is the same for each alternative. However, each investment
alternative has a different perceived risk to the investor;
thus it is advisable to diversify. The investor wants to know
how much to invest in each alternative in order to maximize
the return. The following guidelines have been established
for diversifying the investment and lessening the risk
perceived by the investor.
 No more than 20% of the total investment should be in
an income bonds.
 The amount invested in certificates of deposit should not
exceed the amount invested in other three alternatives.
 At least 30% of the investment should be in treasury bills
Solution
Maximize Z = 0.085 X1+ 0.1X2+
0.065X3+0.13X4

Subjected to:
 X4 < 14,000
 X2 - X 1 - X 3 - X 4 < 0
 X2 + X 3 > 21,000
 3X1 - X3 <0
 X1 + X2 + X3 + X4 = 70,000,
Graphing the Model
This method can be used only to solve
problems that involve two decision
variables.
The graphical approach:
o Plot each of the constraints
o Determine the region or area that
contains all of the points that satisfy the
entire set of constraints
o Determine the optimal solution
Feasible Region Based on a Plot of the
First Constraint (assembly time) and the
Non negativity Constraint
A Completed Graph Showing the
Assembly and Inspection Constraints
and the Feasible Solution Space
Completed Graph Showing All of the
Constraints and the Feasible Solution
Space
Finding the Optimal Solution
– The extreme point theorem
If a problem has an optimal solution at
least one optimal solution will occur at a
corner point of the feasible solution space.
The extreme point approach
Involves finding the coordinates of each
corner point that borders the feasible
solution space and then determining
which corner point provides the best value
of the objective function.
The Extreme Point Approach
o Graph the problem and identify the feasible
solution space.
o Determine the values of the decision
variables at each corner point of the feasible
solution space.
o Substitute the values of the decision
variables at each corner point into the
objective function to obtain its value at each
corner point.
o After all corner points have been evaluated
in a similar fashion, select the one with the
highest value of the objective function (for a
Graph with Extreme Points of
the Feasible Solution Space
Indicated
Extreme Point Solutions
The Objective Function
(Iso-Profit Line) Approach
This approach directly identifies the
optimal corner point, so only the
coordinates of the optimal point need to
be determined.
Accomplishes this by adding the objective
function to the graph and then using it to
determine which point is optimal.
Avoids the need to determine the
coordinates of all of the corner points of
the feasible solution space.
Finding the Optimal Solution
Graphing—Objective Function Approach

1. Graph the constraints


2. Identify the feasible solution space
3. Set the objective function equal to some
amount that is divisible by each of the
objective function coefficients.
4. After identifying the optimal point,
determine which two constraints
intersect there.
5. Substitute the values obtained in the
previous step into the objective function
to determine the value of the objective
function at the optimum.
McGra
w-
Abera 11/17/2024 Hill/
Irwin
Minimization
Determine the values of decision variables
x1 and x2 that will yield the minimum cost
in the following problem. Solve using the
extreme point approach.
Graphing the Feasible Region
and Using the Objective Function
to Find the Optimum Solution
Minimization:
Minimization: Solution
Solution
The extreme points can be determined
either by inspection or simultaneous
equations. The results are summarized in
the table below. The minimum value of the
objective function is Br. 0.38, which occurs
when X1 = 25/11 and X2 = 24/11
Extreme Coordinates Value of the
Points X1 X2 Objective
Function

A 0 9 0.63
B 25/11 24/11 0.38
Slack versus Surplus
Slack is the amount of a scarce resource that
is unused by a given solution. It exist in a <
constraint.
Surplus on the other hand is the amount by
which the optimal solution causes a >
constraint to exceed the required minimum
amount.
Some Special Issues
 No Feasible Solutions
 Occurs in problems where to satisfy one of the
constraints, another constraint must be
violated.
 Unbounded Problems
 Exists when the value of the objective function
can be increased without limit.
 Redundant Constraints
 A constraint that does not form a unique
boundary of the feasible solution space; its
removal would not alter the feasible solution
space.
 Multiple Optimal Solutions
 Problems in which different combinations of
Infeasible Solution
Example: Max Z = 3X1+2X2
Subject to: 2X1 + X2 < 2
3X1 + 4X2 > 12
X1, X2 > 0
Unbounded Solution
Redundant Constraints
Multiple Optimal Solutions
Exercise: Special Issue
Simplex Method

McGra
w-
Abera Abebe 11/17/2024 Hill/
Irwin
Simplex Method
The Simplex Method is an
iterative technique that begins
with a feasible solution that is
not optimal, through algebraic
manipulation, the solution is
improved until no further
improvement is possible.
Developing the Initial Simplex Tableau
Completed Initial Tableau

A simplex solution in a maximization


problem is optimal if the C–Z row
consists entirely of zeros and
negative numbers (i.e., there are no
positive values in the bottom row).
When this has been achieved, there is
no opportunity for improving the
Determining the Entering and
Exiting Variables

Select the leaving variable as the one


that has the smallest nonnegative ratio
of quantity divided by substitution rate.
Completed Second Tableau

At this point, variables s1, x1, and s3 are in solution.


Not only are they listed in the basis, they also have
a 0 in row C – Z. The solution at this point is s1 = 56,
x1 = 11, and s3 = 6.
Note, too, that x2 and s2 are not in solution. Hence,
they are each equal to zero. The profit at this point
is 660. Also, note that each variable in solution has
a unit vector in its column.
Completed Third Tableau

In this tableau, all of the values in the bottom


row are either negative or zero, indicating that
no additional potential for improvement exists.
Hence, this tableau contains the optimal
simplex solution, which is
s1 = 24
x1 = 9
x2 = 4
Summary of the Simplex Procedure
for a Maximization Problem
Initial Tableau
1. Write each constraint so that all variables are
on the left side and a nonnegative constant is
on the right. Then add a slack variable to the
left side, thereby making it an equality.
2. Develop the initial tableau.
 List the variables across the top of the table
and write the objective function coefficient
of each variable just above it.
 There should be one row in the body of the
table for each constraint. List slack variables
in the basis column, one per row.
 In the C column, enter the objective function
coefficient of 0 for each slack variable.
Summary of the Simplex Procedure
for a Maximization Problem (cont’d)
Subsequent Tableaus
1. Identify the variable with the largest positive
value in row C – Z. This variable will come into
solution next.
2. Using the constraint coefficients in the
entering variable’s column, divide each one
into the corresponding Quantity column value.
The smallest nonnegative ratio that results
indicates which variable will leave the solution
mix.
3. Compute replacement values for the leaving
variable: Divide each element in the row by
the row element that is in the entering
variable column. These are the pivot row
Summary of the Simplex Procedure
for a Maximization Problem (cont’d)
Subsequent Tableaus (cont’d)
4. Compute values for each of the other constraint
equations:
 Multiply each of the pivot row values by the number
in the entering variable column of the row being
transformed
 Then subtract the resulting equation from the current
equation for that row and enter the results in the
same row of the next tableau.
4. Compute values for row Z: For each column, multiply
each row coefficient by the row value in column C
and then add the results. Enter these in the tableau.
5. Compute values for row C – Z: For each column,
subtract the value in row Z from the objective
Summary of the Simplex Procedure
for a Maximization Problem (cont’d)
Subsequent Tableaus (cont’d)

6. Examine the values in the bottom row. If all


values are zero or negative, the optimal
solution has been reached. The variables
that comprise the solution are listed in the
basis column and their optimal values can be
read in the corresponding rows of the
quantity column. The optimal value of the
objective function will appear in row Z in the
Quantity column.
7. If the solution is not optimal, repeat steps 1–
7 of this section until the optimal solution
has been attained.
Maximization With Mixed
Constraints and Minimization
o Problemthat have mixed
In dealing with problems
constraints, some combination of slack,
surplus and artificial variables will be called
for.
o Artificial variables are added to equality
constraints.
o In ≥ constraint, we should subtract a
surplus variable and add artificial variable.
o Surplus variables are assigned a coefficient
of zero in the objective function.
o Artificial Variables are assigned a very large
negative value (- M) in maximization
problems and a very large positive value
(+M) in minimization problems.
1 2
3X1 + 4X2 + A1 = 40
Example
5X1 + 3X2 ≥ 100
5X1 + 3X2 – S1 + A1 = 100
Maximize: 20X1 + 10X2 + 0S1 + 0S2 –
MA2
What types of constraint functions are
involved?
Two constraints: the first one is ≤
constraint and the second is ≥
constraint
Minimize: 4X1 + 3X2 + 0S1 + 0S2 + MA3
What types of constraint functions are
involved?
Three constraints: the first and the
Example
Example :: Solve
Solve this
this maximization
maximization
problem
problem using
using the
the simplex
simplex
approach
approach
Initial Tableau
The Second Tableau
The Third Tableau
The Final Tableau
Example:
Example:
Solve this minimization problem using
the Simplex Method
Initial Tableau
Second Tableau
Third Tableau
Some Special Issues
Unbounded Solutions
 A solution is unbounded if the objective
function can be improved without limit.
 An unbounded solution will exist if there
are no positive values in the pivot column.
Degeneracy
 A conditions that occurs when there is a
tie for the lowest nonnegative ratio which,
theoretically, makes it possible for
subsequent solutions to cycle (i.e., to
return to previous solutions).
Solve the problem using simplex
method
Second Tableau
Final Simpex Tableau
Some Special Issues (cont’d)
Multiple Optimal Solutions
 Occur when the same maximum value of
the objective function might be possible
with a number of different combinations
of values of the decision variables
because the objective function is parallel
to a binding constraint.
Consider this modified computer
problem:
 Maximize Z = 60x1 + 30x2
Final Tableau
The Alternate Optimal Solution
Infeasibility
A problem in which no combination of
decision and slack/surplus variables will
simultaneously satisfy all constraints.
Can be the result of an error in
formulating a problem or it can be
because the existing set of constraints is
too restrictive to permit a solution.
Recognized by the presence of an
artificial variable in a solution that
appears optimal and it has a nonzero
quantity.
Solve the following problem using
simplex
Simplex Tableaus for Infeasibility Problem
Sensitivity and
Duality
Sensitivity Analysis
Enables the decision maker to determine how
a change in one of the values of a model will
impact the optimal solution and the optimal
value of the objective function while holding
all other parameters constant.
Provides the decision maker with greater
insight about the sensitivity of the optimal
solution to changes in various parameters of
a problem.
Permits quick examination of changes due to
improved information relating to a problem or
because of the desire to know the potential
impact of changes that are contemplated.
Changes in Parameter Values
Categories of model parameters subject to
potential changes
The value of an objective function
coefficient
The right-hand side (RHS) value of a
constraint
A coefficient of a constraint
Concerns about ranges of changes
Which range pertains to a given
situation?
How can the range be determined?
What impact on the optimal solution does
a change that is within the range have?
A Change in the RHS of a Constraint
Analysis of RHS changes begins with
determination of a constraint’s shadow
price in the optimal solution.
Shadow Price indicates the impact that a
one unit change in the amount of a
constraint would have on the value of the
objective function.
Range of feasibility: the range of values
over which the right-hand-side (RHS) value
can change without causing the shadow
price to change.
Within this range of feasibility, the same
decision variables will remain optimal,
although their values and the optimal
The Final Simplex Table

To find the values, for each


constraint, the entries in the
associated slack columns must be
divided into the values in the
quantity column
The General Rule

The reverse is true for


minimization
Example
The manager is contemplating a change
in the level of the storage constraint:
an increase of 3 cubic feet
an increase of 8 cubic feet
Determine the revised optimal solution
for the change.
A Change in an Objective
Function Coefficient
There are two cases:
 Changes for a variable that is not currently in the solution
mix
 Changes for a variable that is currently in the solution mix
The range over which a non-basic variable’s
objective function coefficient can change without
causing that variable to enter the solution mix is
called its Range of Insignificance.
The range over which the objective function
coefficient of a variable that is in the solution can
change without changing the optimal values of the
decision variable is called the Range of Optimality
A value of the objective function that falls within the
range of optimality will not change the optimal
solution, although the optimal value of the objective
function will change.
If a variable is not currently in solution in a
maximization problem, its objective function
coefficient would have to increase by an
amount that exceeds the C – Z values for
the variable to end up as a basic variable in
the optimal solution.
To find the range of optimality, the values in
the C – Z must be divided by the
corresponding row values of the variable in
question.
Example:
 Determine the range of optimality for the decision
variables in the computer problem.
 Solution:
 For x1 we find:

The smallest positive ration is +40. Therefore, the


coefficient of X1 can be increased by Birr 40 without
changing the optimal solution. The upper is (Birr 60
+ Birr 40) = Birr 100. Also, the smallest negative
ratio is -10; therefore, the lower end of the range
equal to (Birr60 - Birr10 )= Birr 50.
For x2 we find:

The range of optimality for the objective


function coefficient of x2 is Birr 30 to Birr
60.
Duality
An alternate formulation of a linear
programming problem as either the original
problem or its mirror image, the dual, which
can be solved to obtain the optimal solution.
Its variables have a different economic
interpretation than the original formulation
of the linear programming problem (the
primal).
It can be easily used to determine if the
addition of another variable to a problem will
change the optimal.
Formulation of a Dual
The number of decision variables in
the primal is equal to the number of
constraints in the dual.
The number of decision variables in
the dual is equal to the number of
constraints in the primal.
Since it is computationally easier to
solve problems with less constraints
in comparison to solving problems
with less variables, the dual gives us
the flexibility to choose which
A comparison of these two versions of
the problem will reveal why the dual
might be termed the “mirror image”
of the primal.
The original objective was to
minimize, whereas the objective of
the dual is to maximize.
In addition, the coefficients of the
primal’s objective function become
the right-hand-side values for the
dual’s constraints, whereas the
primal’s right-hand side values
become the coefficients of the dual’s
Example
Formulating the Dual when the Primal
has Mixed Constraints
 In order to transform a primal problem into its dual,
it is easier if all constraints in a maximization
problem are of the < variety, and in a minimization
problem, every constraint is of the > variety.
 To change the direction of a constraint, multiply
both sides of the constraints by -1.
 If a constraint is an equality, it must be replaced
with two constraints, one with a < sign and the
other with a > sign.
 Example: Formulate the dual of this LP model.
 Maximize z = 50X1 + 80X2
 Subject to:
 3X1 + 5X2 ≤ 45
 4X1 + 2X2 ≥ 16
 6X1 + 6X2 = 30
 X1 , X 2 ≥0
Final tableau of Primal solution to the
server problem:

Final tableau of Dual solution to the


server problem
Economic Interpretation of The Dual
Economic interpretation of dual solution
results
 Analysis enables a manager to evaluate
the potential impact of a new product.
 8y1 + 4y2 + 5y3 > 70

 Analysis can determine the marginal


values of resources (i.e., constraints) to
determine how much profit one unit of
each resource is equivalent to.
 Analysis helps the manager to decide
which of several alternative uses of
resources is the most profitable.
End of Chapter Two

You might also like