You are on page 1of 52

MATHEMATICAL

PROGRAMMING -
LECTURE # 7 & 8
OPTIMIZATION OF MODELS
Formulate linear Programme (LP)
Models
Use Graphical LP (GLP) Method to
solve LP Models
- (The CORNER POINT METHOD)
Spreadsheet Nodels -
OPTIMIZATION OF MODELS
Formulate linear Programme (LP) Models
Problem Formulation or modeling is the process oI
translating the verbal statement oI a problem into a
mathematical statement.
Formulating models is an art that can only be
mastered with practice and experience
Even though every problem has some unique
Ieatures, most problems also have common
Ieatures
There are some general guidelines:
Formulate linear Programme
(LP) Models
Problem Formulation Guidelines
Understand the Problem Thoroughly
dentify the items that need to be included in
the model
Read the problem description quickly to get a
feel for what is involved
Taking notes will help you focus on the key
issues and facts.
Describe the objective
Formulate linear Programme
(LP) Models
Problem Formulation Guidelines
Define the Decision Variables
Write the Objective in Terms of the Decision
Variables
Describe each Constraint
Write the Constraints in Terms of the Decision
Variables
To prevent the Decision Variables from having
negative values add constraints showing non-
negativity constraints. Non-negativity constraints
are a general feature of all linear programming
problems.
$teps in Developing a Linear
Programming (LP) Model
1) Formulation
2) $olution
3) nterpretation and $ensitivity Analysis
Properties of LP Models
1) $eek to minimize or maximize
2) nclude "constraints or limitations
3) There must be alternatives available
4) All equations are linear
TYPE$ OF MATHEMATCAL
PROGRAMMNG PROBLEM$
1. Production $cheduling
2. Production Mix
3. Assignment
4. Labour Planning
5. ngredient Blending
6. Network Problems
Example LP Model Formulation:
The Product Mix Problem Flair
Furniture Co. Ltd.
Each table takes 3 hours of carpentry and 2
hours in the painting and varnishing shop. Each
chair requires 4 hours in carpentry and 1 hour in
painting and varnishing. During the current
production period, 2400 hours of carpentry time
are available and 1000 hours in painting and
varnishing are available. Each table sold yields
a profit of $7; each chair produced is sold for a
$5 profit.
What is the best combination of tables and
chairs that should be made so as to yield the
maximum profit?
Example LP Model Formulation:
The Product Mix Problem
Decision: How much of each product to make?
Objective: Maximize profit
Constraints: Limited resources
Example: Flair Furniture Co.
Two products: Chairs and Tables
Decision: How many of each to make this
month?
Objective: Maximize profit
Flair Furniture Co. Data
Tables
(per table)
Chairs
(per chair)
Hours
Available
Profit
Contribution
$7 $5
Carpentry 3 hrs 4 hrs 2400
Painting 2 hrs 1 hr 1000
Other Limitations:
Make no more than 450 chairs
Make at least 100 tables
Decision Variables:
T = Num. of tables to make
C = Num. of chairs to make
Objective Function: Maximize Profit
Maximize $7 T + $5 C
Constraints:
Have 2400 hours of carpentry time
available
3 T + 4 C < 2400 (hours)
Have 1000 hours of painting time available
2 T + 1 C < 1000 (hours)
More Constraints:
Make no more than 450 chairs
C < 450 (num. chairs)
Make at least 100 tables
T > 100 (num. tables)
Nonnegativity:
Cannot make a negative number of chairs or tables
T > 0
C > 0
Model $ummary
Max 7T + 5C (profit)
$ubject to the constraints:
3T + 4C < 2400 (carpentry hrs)
2T + 1C < 1000 (painting hrs)
C < 450 (max # chairs)
T > 100 (min # tables)
T, C > 0 (nonnegativity)
Graphical $olution
Graphing an LP model helps provide
insight into LP models and their solutions.
While this can only be done in two
dimensions, the same properties apply to
all LP models and solutions.
NB. For a linear programming problem with two
decision variables, the exact values of the decision
variables can be determined by:
1. dentifying all the corner/extreme points of the feasible
region, then
2. $olving the two simultaneous constraint equations
associated with each of the points.
3. Plug in the values of each of these points into the
objective function.
4. The optimal point is the point which gives the maximum
or minimum value based on what the objective function
ask for.
FNDNG THE OPTMAL
$OLUTON
Carpentry
Constraint Line
3T + 4C = 2400
ntercepts
(T = 0, C = 600)
(T = 800, C = 0)
0 800 T
C
600
0
FeasibIe
< 2400 hrs
InfeasibIe
> 2400 hrs
Painting
Constraint Line
2T + 1C = 1000
ntercepts
(T = 0, C = 1000)
(T = 500, C = 0)
0 500 800 T
C
1000
600
0
0 100 500 800 T
C
1000
600
450
0
Max Chair Line
C = 450
Min Table Line
T = 100
FeasibIe
Region
Corner Points
C 100, 450
B 100, 0
D 200, 450
A 500, 0
E
A = (500, 0) Read off the graph
B = (100, 0) - Read off the graph
C = (100, 450) - Read off the graph
D = (200, 450) Read off the graph for C &
$olve for T using $imultaneous Equations
E = (320, 360) - $olve for T & C using
$imultaneous Equations
Corner Points
A = (500, 0) Read off the graph
B = (100, 0) - Read off the graph
C = (100, 450) - Read off the graph
D = (200, 450) Read off the graph for C &
$olve for T using $imultaneous Equations
E = (320, 360) - $olve for T & C using
$imultaneous Equations
Corner Points
0 100 200 300 400 500 T
C
500
400
300
200
100
0
Objective
Function Line
7T + 5C = Profit
OptimaI Point
(T = 320, C = 360)
FNDNG THE OPTMAL
$OLUTON
Recall Maximize P = $7 T + $5 C
At Pt. A, T= 500,C= 0, => P = 3500
At Pt. B, T= 100, C= 0 => P = 700
At Pt. C, T= 100, C = 450 => P = 2,950
At Pt. D, T= 200, C= 450 => P= 3,650
At Pt. E, T= 320, C= 360 => P = 4,040
The optimal solution occurs at Pt. E => that
Flair Furniture should make 320 Tables
and 360 Chairs, so as to maximize profit
(of $4,040).
0 100 200 300 400 500 T
C
500
400
300
200
100
0
Additional Constraint
Need at least 75
more chairs than
tables
C > T + 75
Or
C T > 75
T = 320
C = 360
No Ionger
feasibIe
New optimaI point
T = 300, C = 375
LP Characteristics
FeasibIe Region: The set of points that
satisfies all constraints
Corner Point Property: An optimal
solution must lie at one or more corner
points
OptimaI SoIution: The corner point with
the best objective function value is optimal
$pecial $ituation in LP
1. Redundant Constraints - do not affect
the feasible region
Example: x < 10
x < 12
The second constraint is redundant
because it is 088 restrictive.
$pecial $ituation in LP
2. InfeasibiIity when no feasible solution
exists (there is no feasible region)
Example: x < 10
x > 15
$pecial $ituation in LP
3. AIternate OptimaI SoIutions when
there is more than one optimal solution
Max 2T + 2C
$ubject to:
T + C < 10
T < 5
C < 6
T, C > 0
0 5 10 T
C
10
6
0
All points on
Red segment
are optimal
$pecial $ituation in LP
4. Unbounded SoIutions when nothing
prevents the solution from becoming
infinitely large
Max 2T + 2C
$ubject to:
2T + 3C > 6
T, C > 0
0 1 2 3 T
C
2
1
0
Using Excel's $olver for LP
Recall the Flair Furniture Example:
Max 700 T + 500 C (profit)
$ubject to the constraints:
3T + 4C < 2400 (carpentry hrs)
2T + 1C < 1000 (painting hrs)
C < 450 (max # chairs)
T > 100 (min # tables)
T, C > 0 (nonnegativity)
$teps Formulation of Worksheet
1. Enter the problem data in the top part of the
worksheet
2. $pecify cell locations for the decision variables
3. $elect a cell and enter a formula for computing
the value of the objective function
4. $elect a cell and enter a formula for computing
the left-hand side of each constraint
5. $elect a cell and enter a formula for computing
the right-hand side of each constraint
6. N.B. The worksheet consists of 2 sections a
data section and a model section
THE COMPLETE MATHEMATCAL MODEL
Max 10 $ + 9 D s.t.
0.7 $ + 1 D < 630 Cutting & Dyeing
0.5 $ + 0.8 D < 600 $ewing
1 $ + 0.67 D < 708 Finishing
0.1 $ + 0.25 D < 135 nspection & Packaging
$, D > 0 Non-negativity Constraints
Next $tep:
Find the product mix (.e. the combination of $ and D) that
satisfies all the constraints and, at the same time, yields a
value for the objective function that is greater than or equal to
the value given by any other feasible solution.
Once these values are calculated, we would have found the
optimal solution to the problem
Problem Formulation Par, nc.
Formulation of Worksheet
U$NG $OLVER - $TEP$
U$NG WNDOW QM TO
$OLVE LNEAR
PROGRAMMNG PROBLM$
WHAT ARE TRAN$PORTATON,
A$$GNMENT AND TRAN$-
$HPMENT MODEL$?
Transportation, assignment, and trans-shipment problems
belong to a special class of linear programming problems
called network flow problems
NB.
A wide variety of applications can be modeled as
transportation, assignment, or transshipment problems;
These problems have a mathematical structure that has
enabled management scientists to develop efficient
specialized solution procedures; as a result, even large
problems can usually be solved with just a few seconds
of a computer time.
TRAN$PORTATON PROBLEM: A
NETWORK MODEL & A LNEAR
PROGRAMMNG FORMULATON
Example of the TRAN$PORTATON
PROBLEM:
Planning for the distribution of goods and
services from several supply locations.
i.e. The quantity of goods available at each
supply location (origin) is limited, and the
quantity of goods needed at each of
several demand locations (destinations) is
known.
The usual objective in a transportation
problem is to minimize the cost of shipping
goods from the origins to the destinations.
N.B. $olving transportation problems with a
general-purpose linear programming code is
ok for small to medium-sized problems.
However, these problems often grow very
large (e.g. 100 origins and 1,000 destinations
would have 100,000 variables) The network
structure of the transportation problem has
enabled management scientists to develop
special-purpose solution procedures that
greatly simplify the computations.
TRAN$PORTATON
PROBLEM
A TRAN$PORTATON PROBLEM
THE ENVRONMENTAL $CAN:
FO$TER GENERATOR$
The problem involves the transportation
of a product from three plants to four
distribution centres.
Foster Generators Ltd. has plants in
Cleveland, Ohio: Bedford, ndiana; and
York, Pennsylvania. Production
capacities over the next 3 month
planning period for one particular type of
generator are:
THE PROBLEM IN A NUTSHELL
D$TRBUTON
CENTRE
3 MTH. DEMAND
FORECA$T
(Units)
1 Boston 6,000
2 Chicago 4,000
3 $t. Louis 2,000
4 Lexington 1,500
TOTAL 13,500
ORGN BO$TON CHCAG
O
$T.
LOU
$
LEXNG
-TON
Cleveland 3 2 7 6
Bedford 7 5 2 3
York 2 5 4 5
PLANTS
4 D!STR!BUT!ON CENTRES
TRANSPORTAT!ON COST
The Objective of the
Transportation
Problem is to
minimize the total
transportation cost.
ORGN PLANT 3 MTH.
PDN.
CAPACTY
(units)
1 Cleveland 5,000
2 Bedford 6,000
3 York 2,500
TOTAL 13,500
THE GRAPHICAL NETWORK

Cleveland

Boston

ork
2
Bedford

St. Louis
2
Chicago
4
Lexington
Supplies
Destination
Routes (arcs)
Demands

2
4

2
2

Plant
(Origin Nodes
Transportation
Cost per Unit
Distribution Centres
(destination nodes)
TRANSPORTATION PROBLEM:
THE LINEAR PROGRAMMING
MODEL SOLUTION
The Decision Variables for a
Transportation Problem having m
origins and n destinations are written
as:
xij = number of units shipped from
origin i to destination j,
where i = 1, 2, 3, ..,m. and
j = 1, 2, 3 ..., n.
Because the the Objective of the Transportation
Problem is to minimize the total transportation cost,
we can use the information from the network to
develop the cost expressions: i.e.
Transportation costs for units shipped from:
Cleveland = 3x
11
+ 2x
12
+ 7x
13
+ 6x
14
Bedford = 7x
21
+ 5x
22
+ 2x
23
+ 3x
24
York = 2x
31
+ 5x
32
+ 4x
33
+ 5x
34
NB. The first subscript identifies the "from
node of the corresponding arc; and the second
subscript identifies the "to node of the arc.
TRANSPORTATION PROBLEM:
THE LINEAR PROGRAMMING
MODEL SOLUTION
NB. The sum of these expressions
provides the Objective Function showing
the total transportation cost for Foster
Generators Ltd.
Transportation problems need constraints
because each origin has a limited supply
and each destination has a specific
demand.
TRANSPORTATION PROBLEM:
THE LINEAR PROGRAMMING
MODEL SOLUTION
The $upply Constraints
The capacity at the Cleveland plant is
5,000 units. With the total number of units
shipped from the Cleveland plant
expressed as x
11
+x
12
+x
13
+x
14,
Then the supply constraint for the Cleveland plant
is: x
11
+x
12
+x
13
+x
14,
< 5,000
The Bedford and York $upply constraints are:
x
21
+x
22
+x
23
+x
24,
< 6,000 Bedford
x
31
+x
32
+x
33
+x
34,
< 2,500 York
With the four distribution centres as the
destinations, four demand constraints are
needed to ensure that destination demands
will be satisfied:
x
11
+x
21
+x
31,
= 6,000 Boston Demand
x
12
+x
22
+x
32 =
4,000 Chicago Demand
x
13
+x
23
+x
33,
= 2,000 $t. Louis Demand
x
14
+x
24
+x
34,
= 1,500 Lexington Demand
The Demand Constraints
The Complete Linear Model
Min 3x
11
+ 2x
12
+ 7x
13
+ 6x
14
+ 7x
21
+5x
22
+ 2x
23
+ 3x
24
+ 2x
31
+ 5x
32
+ 4x
33
+ 5x
34
s.t. x
11
+x
12
+x
13
+x
14,
< 5,000
x
21
+x
22
+x
23
+x
24,
< 6,000
x
31
+x
32
+x
33
+x
34,
< 2,500
x
11
+x
21
+x
31
= 6,000
x
12
+x
22
+x
32 =
4,000
x
13
+x
23
+x
33
= 2,000
x
14
+x
24
+x
34
= 1,500
For all x
ij
> 0, for i = 1, 2, 3; j = 1, 2, 3, 4.
$OLUTON PROCEDURE
Transportation Problem
$tep 1 Enter the data for the transportation
costs, the origin supplies, and the destination
demands in the top part of the worksheet.
$tep 2 - The Linear Programming model is
developed in the bottom part of the
worksheet.
N.B. As with all Linear Programmes, the model
has 4 key elements
Decision VariabIes
Objective Function
Constraints - R.H.S.
Constraints - L.H.S.
U$NG WNDOW QM TO
$OLVE THE
TRAN$PORTATON PROBLEM
TUTORAL QUE$TON
Consider the following linear programming
formulation:
Minimize Cost Z = $5X1 + $7X2
$ubject to: 2X1 + 3X2 > 120
8X1 + 2X2 > 150
3X1 + 2X2 > 120
X2 < 80
X1 < 100
X1 , X2 > 0
Graphically illustrate the feasible region
ndicate which corner point produces the
optimal solution
What is the cost of this solution?

You might also like