Uploaded by chalie molla

Lecture 6 Linear programming1

advertisement
Module 5 Linear programming(LP)
8/16/2017
1
LEARNING OBJECTIVES
 Understanding the forms and characteristics of linear programming
model
 Understand basic assumptions and properties of linear
programming (LP).
 To develop the skill and knowledge for the formulation of an LP
model
 Use graphical solution procedures for LP problems with only two
variables to understand how LP problems are solved.
 Understand special situations such as redundancy, infeasibility,
unboundedness, and alternate optimal solutions in LP problems.
 Understand the simplex solution procedure for LP problems
Module Outline
 Introduction
 The Linear Programming Model
 Examples of LP models formulation
Graphical Solution to LP Problems
INTRODUCTION




Management decisions in many organizations involve trying
to make most effective use of resources (machinery, labor,
money, time, raw materials e.t.c.)
To solve problems of resource allocation one may use
mathematical programming.
Mathematical programming is used to find the best or
optimal solution to a problem that requires a decision or set
of decisions about how best to use a set of limited resources
to achieve a state goal of objectives.
Linear programming (LP) is the most common type of
mathematical programming.
INTRODUCTION
What is Linear Programming?
Say you own a 5000 square meter farm. On this farm
you can grow wheat, barley, corn or some
combination of the 3. You have a limited supply of
fertilizer and pesticide, both of which are needed (in
different quantities) for each crop grown. Let’s say
wheat sells at $38 per quntal, barley is $55, and corn
is $25.
So, how many of each crop should
you grow to maximize your profit?
INTRODUCTION
Linear programming is a mathematical tool for
maximizing or minimizing a linear objective
function (usually profit or cost of production or size),
subject to certain linear set constraint functions.
INTRODUCTION

LP assumes all relevant input data and parameters are
known with certainty (deterministic models).

Linear programming requires that all the
mathematical functions in the model be linear functions.

Computers play an important role in the solution of LP
problems
INTRODUCTION
Linear Equatıons and Inequalıtıes

This is a linear equation:
2A + 5B = 10

This equation is not linear:
2A2 + 5B3 + 3AB = 10

LP uses, in many cases, inequalities like:
A+B C

or A + B  C
As the name implies LP models have a basic characteristic that
both the objective function and the constraints are linear functions
of the decision variables.
INTRODUCTION
In Linear programming:
The word programming does not refer here to computer
programming; rather, it is essentially a synonym for
planning.
Thus, Linear programming involves the planning of
activities to obtain an optimal result.
INTRODUCTION

Steps Involved:
 Determine the objective of the problem and
describe it by a criterion function in terms of the
decision variables.
 Find
 Do
out the constraints.
the analysis which should lead to the selection
of values for the decision variables that optimize
the criterion function while satisfying all the
constraints imposed on the problem.
The Linear Programming Model
 LP Model has three basic components
1. Decision variables that we seek to determine.
2. Objective function (goal) that we need to optimize
(maximize or minimize)
3. Constraints that the solution must satisfy
 The proper definition of the decision variables is an
essential first step in the development of the model.
 Once done, the task of constructing the objective
function and constraints becomes more straightforward
Linear Programming Model

Decision variables - mathematical symbols representing
levels of activity of a firm.

Objective function - a linear mathematical relationship
describing an objective of the firm, in terms of decision
variables, that is to be maximized or minimized

Constraints - restrictions placed on the firm by the
operating environment stated in linear relationships of
the decision variables.

Parameters - numerical coefficients and constants used in
the objective function and constraint equations.
The Linear Programming Model
Let:
X1, X2, X3, ………, Xn = decision variables
Z = Objective function or linear function
Requirement: Maximization or Mininization of the linear function Z.
Z = c1X1 + c2X2 + c3X3 + ………+ cnXn
…..Eq (1)
subject to the following constraints:
…..Eq (2)
…..Eq (2)
where aij, bi, and cj are given constants.
The general form of an LP model can
be expressed as:
Minimize or
and
14
8/16/2017
The Linear Programming Model

The linear programming model can be written in more
efficient notation as:
…..Eq (3)
The decision variables, xI, x2, ..., xn, represent levels of n competing
activities.
The Linear Programming Model
Forms of a Linear programming
 Because LP models can be presented in a variety of
forms (maximization, minimization, ≥, =, ≤) it is
necessary to modify these forms to fit a particular
…..Eq (3)
solution procedure.
 The most commonly used form of LP model formulation
is the standard form.
The standard form of an LP model can
be expressed as:
n
Max(orMin) Z   c j x j
j 1
Subject to the following constraints
n
a x  b
j 1
ij
j
i
For i = 1, 2, 3, …, m
xj  0
8/16/2017
17
Where cj is the objective function coefficient and
aij is the technology coefficient, and
bi is the right hand side (RHS) coefficient.
xj is the decision variable
The exact form of these constraints may differ from one
problem to another, they can be easily transformed into
the standard form by using slack and surplus variables.
8/16/2017
18
In more compact vector notation, the standard
problem becomes:
minimize or Maximize cT x
subject to Ax = b and x ≥ 0
Here x is an n-dimensional column vector, cT is
an n-dimensional row vector, A is an m×n matrix,
and b is an m-dimensional column vector. The
vector inequality x ≥ 0 means that each
component of x is nonnegative.
8/16/2017
19
Basic characteristics of the Standard Form of LP
model formulation
1. All constraints are equality except for the
nonnegativity constraints associated with the
decision variables which remains inequality of the ≥
type;
2. All the RHS coefficients of the constraints equations
are nonnegative, i.e., bi ≥ 0;
3. All decision variable are nonnegative; and
4. The objective function can be either maximization or
minimization
8/16/2017
20
BASIC STEPS IN DEVELOPING AN LP MODEL
Formulation

Process of translating problem scenario into simple LP model
framework with a set of mathematical relationships.
Solution

Mathematical relationships resulting from formulation process
are solved to identify optimal solution.
Interpretation and What-if Analysis

Problem solver or analyst works with the manager to
 interpret results and implications of problem solution.
 iinvestigate changes in input parameters and model variables and
see their impact on problem solution results.
The Importance of Linear Programming
Many real world problems lend themselves to linear
programming modeling and they can be approximated
by using linear models.
There are efficient solution techniques that solve
linear programming models
 there are also software packages such as (EXCEL
SOLVER, GAMS, LINGO, etc. ) for solving specific
LP problems;
The output generated from linear programming
packages provides useful “what if” analysis.
Common Terminologies
•
•
•
•
8/16/2017
The function being maximized or minimized,
c1x1 + c2x2 +…+ cnxn, is called the objective
function.
The restrictions normally are referred to as
constraints.
The first m constraints (those with a function
of all the variables ai1x1 + ai2x2 +…+ ainxn on
the left-hand side) are sometimes called
functional constraints (or structural constraints).
Similarly, the xj ≥ 0 restrictions are called non
negativity constraints (or nonnegativity
23
conditions).
properties of LP models
1. Proportionality : This implies that the contribution of
each decision variables in both the objective function and the
constraints to be directly proportional to the value of the
variable.
2. Additivity: this impies that the total contribution of all the
variables in the objective function and in the constraints to be
the direct sum of the individual contributions of each
varaibles.
3. Divisibility : Decision variables are allowed to have any
values, including noninteger values, that satisfy the
functional and nonnegativity constraints.
4. Certainty: All the objective function and the constraint
coefficients of LP model are deterministic.
8/16/2017
24
Examples on LP Problems formulation
25
Example 1. The product-mix problem at Global Electronics
 Two products
1. Global1, a portable music player
2. Global2, a smart mobile phone
 Determine the mix of products that will produce
the maximum profit
8/16/2017
Formulating LP Problems
Hours Required
to Produce 1 Unit
Department
Electronic
Assembly
Profit per unit
Global1
(X1)
Global2
(X2)
Available Hours
This Week
4
3
240
2
$7
1
$5
100
Decision Variables:
X1 = number of portable music players to be produced
X2 = number of smart mobile phones to be produced
Formulating the Problem
Objective Function:
Maximize Profit = $7X1 + $5X2
There are three types of constraints
 Upper limits where the amount used is ≤ the amount
of a resource
 Lower limits where the amount used is ≥ the amount
of the resource
 Equalities where the amount used is = the amount of
the resource
Formulating LP Problems
First Constraint:
Electronic
time used
is ≤
Electronic
time available
4X1 + 3X2 ≤ 240 (hours of electronic time)
Second Constraint:
Assembly
time used
is ≤
Assembly
time available
2X1 + 1X2 ≤ 100 (hours of assembly time)
Examples of LP Problems formulation
29
Example 2. Cropping land allocation to maximize agricultural
benefits
Two crops are grown on a land of 200ha. The cost of
raising crop 1 is 3unit/ha, while for crop 2 it is 1 unit/ha.
The benefit from crop 1 is 5 unit/ha and from crop 2, it is
2 unit/ha. A total of 300units of money is available for
raising both crops. What should be the cropping plan (
how much area for crop 1 and how much for crop 2) in
order to maximize the total net benefits?
8/16/2017
Formulation as a Linear Programming Problem
Let
x1 be the area land used for crop 1 in hectares,
x2 be the area of land for crop 2, and
z the total net benefit(which we want to maximize).
The net benefit of raising crop 1 = 5 – 3 = 2unit/ha
The net benefit of raising crop 2 = 2 – 1 = 1unit/ha
The net benefit of raising both crops is 2x1 +x2
8/16/2017
30
There are two constraints. One limits the total cost of
raising the two crops to 300, and the other limits the
total area of the two crops to 200ha.
The complete formulation of the problem is:
Maximize z = 2x1 + x2 Objective function
Subject to 3x1 + x2 ≤ 300
x1 + x2 ≤ 200
Constraints
x 1, x 2 ≥ 0
8/16/2017
31
Example 3: A Production Problem
 ABC trading wishes to produce two types of products




(A and B): type-A will result in a profit of $1.00, and
type-B in a profit of $1.20.
To manufacture type-A product it requires 2 minutes
on machine I and 1 minute on machine II.
Type-B product requires 1 minute on machine I and 3
minutes on machine II.
There are 3 hours available on machine I and 5 hours
available on machine II.
How many products of each type should ABC make in
order to maximize its profit?
Problem formulation
 Let’s first tabulate the given information:
Profit/Unit
Machine I
Machine II
Type-A
$1.00
Type-B
$1.20
Time Available
2 min
1 min
1 min
3 min
180 min
300 min
 Let x be the number of type-A products and y the
number of type-B products to be made.
Problem Formulation
 Then, the total profit (in dollars) is given by
P  x  1.2 y
which is the objective function to be maximized.
• The total amount of time that machine I is used
is
2x  y
and must not exceed 180 minutes.
• Thus, we have the inequality
2 x  y  180
 The total amount of time that machine II is used
is
x  3y
and must not exceed 300 minutes.
 Thus, we have the inequality
x  3 y  300
Finally, neither x nor y can be negative, so
x0
y0
 In short, we want to maximize the objective function
P  x  1.2 y
subject to the system of inequalities
2 x  y  180
x  3 y  300
x0
y0
Solution Algorithm to Linear
programming models
8/16/2017
37
A. Graphical Method
One simple way to solve an LP problem is using graphical
method.
The graphical procedure includes two steps:
1. Determination of the feasible solution space;
2. Determination of the optimum solution from among
the feasible points in the solution space.
However, the method is limited to LP problems involving
two decision variables.
The method can be illustrated using the following example.
8/16/2017
38
Graphical Solution
 Can be used when there are two decision
variables
1. Plot the constraint equations at their limits by
converting each equation to an equality
2. Identify the feasible solution space
3. Create an iso-profit line based on the
objective function
4. Move this line outwards until the optimal
point is identified
Graphical Method of Solution for the product
mix problem
Number of Smart mobile phones
X2
100 –
–
80 –
Assembly (constraint B)
–
60 –
–
40 –
Electronics (constraint A)
–
20 –
–
|–
0
Feasible
region
|
|
20
|
|
40
|
|
60
|
|
80
|
Number of music player
|
100
X1
Graphical Solution
Iso-Profit
Line Solution Method
X
2
Choose a possible
100 – value for the objective function
Number of Watch TVs
–
80 –
$210Assembly
= 7X1 +(constraint
5X2 B)
–
60 –
Solve for the axis
– intercepts of the function and plot the line
40 –
–
20 –
–
Figure B.3
|–
0
Electronics (constraint A)
Feasible
X2 = 42
region
|
|
20
|
|
40
X1 = 30
|
|
60
|
|
80
Number of X-pods
|
|
100
X1
Graphical Solution
X2
100 –
Number of BlueBerrys
–
80 –
–
60 –
–
40 –
$210 = $7X1 + $5X2
(0, 42)
–
20 –
(30, 0)
–
Figure B.4
|–
0
|
|
20
|
|
40
|
|
60
|
|
80
Number of X-pods
|
|
100
X1
Graphical Solution
X2
100 –
$350 = $7X1 + $5X2
Number of BlueBeryys
–
80 –
$280 = $7X1 + $5X2
–
60 –
$210 = $7X1 + $5X2
–
40 –
–
$420 = $7X1 + $5X2
20 –
–
Figure B.5
|–
0
|
|
20
|
|
40
|
|
60
|
|
80
Number of X-pods
|
|
100
X1
Graphical Solution
X2
100 –
Number of BlueBerrys
–
Maximum profit line
80 –
–
60 –
Optimal solution point
(X1 = 30, X2 = 40)
–
40 –
–
$410 = $7X1 + $5X2
20 –
–
Figure B.6
|–
0
|
|
20
|
|
40
|
|
60
|
|
80
Number of X-pods
|
|
100
X1
Corner-Point Method
X2
100 –
Number of BlueBerrys
2
–
80 –
–
60 –
–
3
40 –
–
20 –
–
Figure B.7
1
|–
0
|
|
20
|
|
40
|
4
|
60
|
|
80
Number of X-pods
|
|
100
X1
Corner-Point Method
 The optimal value will always be at a corner
point
 Find the objective function value at each corner
point and choose the one with the highest profit
Point 1 :
(X1 = 0, X2 = 0)
Profit $7(0) + $5(0) = $0
Point 2 :
(X1 = 0, X2 = 80)
Profit $7(0) + $5(80) = $400
Point 4 :
(X1 = 50, X2 = 0)
Profit $7(50) + $5(0) = $350
Corner-Point Method
 The optimal value will always be at a corner
Solve for the intersection of two constraints
point
1 + 3X2 ≤ 240 (electronics time)
 Find the 4X
objective
function value at each corner
2X1 + 1X2 ≤ 100 (assembly time)
point and
choose the one with the highest profit
4X1 +
Point 1 :
3X2 =
240
4X1 +
- 4X1 - 2X2 =
=
(X1 = +0, X1X
2 =2 0)
-200
40
4X1 +
3(40)
= 240
120 = 240
X1 = $0
= 30
Profit $7(0) + $5(0)
Point 2 :
(X1 = 0, X2 = 80)
Profit $7(0) + $5(80) = $400
Point 4 :
(X1 = 50, X2 = 0)
Profit $7(50) + $5(0) = $350
Corner-Point Method
 The optimal value will always be at a corner
point
 Find the objective function value at each corner
point and choose the one with the highest profit
Point 1 :
(X1 = 0, X2 = 0)
Profit $7(0) + $5(0) = $0
Point 2 :
(X1 = 0, X2 = 80)
Profit $7(0) + $5(80) = $400
Point 4 :
(X1 = 50, X2 = 0)
Profit $7(50) + $5(0) = $350
Point 3 :
(X1 = 30, X2 = 40)
Profit $7(30) + $5(40) = $410
Example 1
Two crops are grown on a land of 200ha. The
cost of raising crop 1 is 3unit/ha, while for
crop 2 it is 1 unit/ha. The benefit from crop 1 is
5 unit/ha and from crop 2, it is 2 unit/ha. A
total of 300units of money is available for
raising both crops. What should be the
cropping plan ( how much area for crop 1 and
how much for crop 2) in order to maximize the
total net benefits?
8/16/2017
49
Formulation as a Linear Programming Problem
Let
x1 be the area land used for crop 1 in hectares,
x2 be the area of land for crop 2, and
z the total net benefit(which we want to maximize).
The net benefit of raising crop 1 = 5 – 3 = 2unit/ha
The net benefit of raising crop 2 = 2 – 1 = 1unit/ha
The net benefit of raising both crops is 2x1 +x2
8/16/2017
50
There are two constraints. One limits the total cost of
raising the two crops to 300, and the other limits the
total area of the two crops to 200ha.
The complete formulation of the problem is:
Maximize z = 2x1 + x2 Objective function
Subject to 3x1 + x2 ≤ 300
x1 + x2 ≤ 200
Constraints
x 1, x 2 ≥ 0
8/16/2017
51
Solution Procedures
First, the feasible region for the constrains should be
mapped. This involves ploting the lines for equality
equations of all constraints, i.e., for
3x1 +x2 = 300
x1 + x2 = 200
x1 = 0 and x2 = 0
As shown in the Figure
8/16/2017
52
Next define the region bounded by the constraints. This is
the region that satisfies all the requirements and termd as
feasible region
Thus, the feasible region of the problem taking all the
constrains into account is OAPD.
Any point within or on the boundary of the region, OAPD,
is a feasible solution to the problem.
The optimum solution, however, is that point which gives
the maximum value of the objective function, z, within or
on the boundary of the region OAPD.
8/16/2017
53
Third, consider a line for the objective function,
z = 2x1 + x2 =c for an arbitrary value c.
If the Z line is moved parallel to itself away from the
origin, the farthest point on the feasible region that it
touches is the point P(50, 150).
Thus the point P (x1 = 50, x2 = 150) represents the optimal
solution to the problem.
The maximum net benefit z = 250unit.
8/16/2017
54
Let us note here that the optimum solution lies in one of
the corners of the feasible region.
In general, the resulting optimum solution to LP problem
using the graphical approach happens to be at one corner
point in the feasible space or at a point on the boundary of
the feasible region called the feasible extreme point.
8/16/2017
55
Possible outcomes that can generally be
obtained in a LP problem.
1. Unique solution. The maximum objective function
intersects a single point.
2. Alternate solutions. Problem has an infinite number
of optima corresponding to a line segment.
3. No feasible solution.
4. Unbounded problems. Problem is underconstrained and therefore open-ended.
56
8/16/2017
8/16/2017
57
(a) Unique solution – represented by a corner point
Alternate solutions – represented by points on one of the
constraint line
(b) No feasible solution
(c) Unbounded problems
58
8/16/2017
possibility for LP problems for no
optimal solutions
This occurs only if
(1) it has no feasible solutions or
(2) the constraints do not prevent improving the
value of the objective function (Z) indefinitely in
the favorable direction (positive or negative).
The latter case is referred to as having an unbounded
Z.
8/16/2017
59
Terminology for Solutions of the LP Model
•
A feasible solution is a solution for which
all the constraints are satisfied.
•
An infeasible solution is a solution for
which at least one constraint is violated.
•
The feasible region is the collection of all
feasible solutions.
8/16/2017
60
•
An optimal solution is a feasible
solution that has the most favorable
value of the objective function.
The most favorable value is the largest
value if the objective function is to be
maximized, whereas it is the smallest value if
the objective function is to be minimized.
8/16/2017
61
There are three important properties of
feasible extreme point in an LP problem
Property 1. If there is only one optimal solution to a linear
programming model, then it must be a feasible extreme
point. If there are multiple optimal solutions, then at
least two must be adjacent feasible extreme points.
Property 2. If a feasible extreme point is better (measured
with respect to X0) than all its adjacent feasible points,
then it is better than all other feasible extreme points
(i.e., it is a global optimum).
Property 3. there are only a finite number of feasible
extreme points. i.e.
Any method that checks only corner points will terminate
eventually.
8/16/2017
62
Next Lecture on Simplex mothed
8/16/2017
63
Download