Post on 05-Jan-2016
description
transcript
Modeling with Linear
Programmingand
Graphical Solution
Steps in formulating Linear Programming (LP)
Models1. Understand the problem.2. Identify the decision variables3. State the objective function as
a linear combination of the decision variables.
4. State the constraints as linear combinations of the decision variables.
5. Identify any upper or lower bounds on the decision variables.
LP Model Formulation: A Maximization Example 1 – Product mix problem - Beaver Creek Pottery Company (1 of 4)
Beaver Creek Pottery Company employs skilled artisans to produce clay bowls and mugs. The two resources used by the company are special pottery clay and skilled labor. Given these limited resources, the company desires to know how many bowls and mugs to produce each day in order to maximize profit. This is generally referred to as a product mix problem.
LP Model FormulationA Maximization Example 1 (2 of 4)
Product mix problem - Beaver Creek Pottery Company How many bowls and mugs should be produced to maximize
profits given labor and materials constraints? Resource Availability: 40 hrs of labor per day (labor
constraint) 120 lbs of clay (material constraint)
Resource Requirements
ProductLabor
(Hr./Unit)Clay
(Lb./Unit)Profit($/Unit)
Bowl 1 4 40
Mug 2 3 50
LP Model FormulationA Maximization Example 1 (3 of 4)
Resource 40 hrs of labor per dayAvailability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize Z = $40x1 + $50x2
Function: Where Z = profit per day
Resource 1x1 + 2x2 40 hours of laborConstraints: 4x1 + 3x2 120 pounds of clay
Non-Negativity x1 0; x2 0 Constraints:
LP Model FormulationA Maximization Example 1 (4 of 4)
Complete Linear Programming Model:
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 404x2 + 3x2 120x1, x2 0
A feasible solution does not violate any of the constraints:
Example: x1 = 5 bowls
x2 = 10 mugsZ = $40x1 + $50x2 = $700
Labor constraint check: 1(5) + 2(10) = 25
≤ 40 hours Clay constraint check: 4(5) + 3(10) = 70
≤ 120 pounds
Feasible Solutions
An infeasible solution violates at least one of the constraints:
Example: x1 = 10 bowls
x2 = 20 mugs Z = $40x1 + $50x2 = $1400
Labor constraint check: 1(10) + 2(20) = 50 > 40 hours
Infeasible Solutions
Example 2 of LP Problem - Blue Ridge Hot Tubs
Blue Ridge Hot Tubs produces two types of hot tubs: Aqua-Spas & Hydro-Luxes.
There are 200 pumps, 1566 hours of labor, and 2880 feet of tubing available.
Aqua-Spa Hydro-Lux
Pumps 1 1Labor 9 hours 6 hoursTubing 12 feet 16 feetUnit Profit $350 $300
Formulating LP Model: Blue Ridge Hot Tubs
1. Understand the problem 2. Identify the decision variables
X1=number of Aqua-Spas to produce
X2=number of Hydro-Luxes to produce
3. State the objective function as a linear combination of the decision variables.
MAX: 350X1 + 300X2
4. State the constraints as linear combinations of the decision variables
1X1 + 1X2 <= 200 } pumps
9X1 + 6X2 <= 1566 } labor
12X1 + 16X2 <= 2880 } tubing
5. Identify any upper or lower bounds on the decision variables.
X1 >= 0 , X2 >= 0
Summary of the LP Model for Blue Ridge Hot Tubs
MAX Z = 350X1 + 300X2
S.T.
1X1 + 1X2 <= 200
9X1 + 6X2 <= 1566
12X1 + 16X2 <= 2880
X1 >= 0
X2 >= 0
Example 3:Wershon Suit Company
JacketsJackets Slacks Available
• Profit,Profit, $/unit$/unit 1010 1515
• Material, Material,
Square yardsSquare yards 22 5 5 5050
• Person Hours Person Hours 4 2 36 4 2 36
How many jackets and slacks should be produced ?How many jackets and slacks should be produced ?
Example 3:Wershon Suit Company
• Type of Objective FunctionType of Objective FunctionMaximize Profit Maximize Profit
• Variable DefinitionVariable Definition
J = number of jackets produced / week
S = number of slacks produced / week
Example 3:Wershon Suit Company
Max Z = $34 J + $40 S
Such thatSuch that2 J + 5 S 2 J + 5 S 50 50 (Material)(Material)
4 J + 2 S 4 J + 2 S 36 36 (sewing)
J , S 0 0 (Nonnegativity)
TJ’s, Inc., makes 2 nut mixes for sale to grocery chains in the
states. The 2 mixes, referred to as the Regular Mix and the Deluxe
Mix, are made by mixing different percentages of 3 types of nuts.
In preparation for the fall season, TJ’s has just purchased 6000
pounds of almonds, 6000 pounds of pecans, and 7500 pounds of
walnuts. The Regular Mix consists of 30% almonds, 20% pecans,
and 50% walnuts. The Deluxe Mix consists of 35% of almonds,
30% pecans, and 35% walnuts. TJ’s accountant has analyzed the
cost of packaging materials, sales price per pound, and other
factors and has determined that the profit contribution per pound
is $1.65 for the Regular Mix and $2.00 for the Deluxe Mix. TJ’s is
committed to using the available nuts to maximize total profit
contribution over the fall season.
Example 4: Product Mix Problem
Let R = amount of regular mix (pounds)D = amount of deluxe mix (pounds)
Max z = 1.65R + 2.00D (Total profit)
s.t. 0.3R + 0.35D 6000 (Availability with
0.2R + 0.3D 6000 ingredient
0.5R + 0.35D 7500 specifications)
R, D 0 (Nonnegativity)
Example 4: Product Mix Problem
Example 5: Transportation Problem
A product is to be shipped in the amounts al, a2, ..., am from m shipping origins and received in amounts bl, b2, ..., bn at each of n shipping destinations.
The cost of shipping a unit from the ith origin to the jth destination is known for all combinations of origins and destinations.
The problem is to determine the amount to be shipped from each origin to each destination such that the total cost of transportation is a minimum.
Transportation Problem – Example 5The Zephyr Television Company ships televisions from three warehouses to three retail stores on a monthly basis. Each warehouse has a fixed supply per month, and each store has a fixed demand per month. The manufacturer wants to know the number of television sets to ship from each warehouse to each store in order to minimize the total cost of transportation.
Demand & SupplyEach warehouse has the following supply of televisions available for shipment each month:Warehouse Supply (sets)1. Cincinnati 3002. Atlanta 2003. Pittsburgh 200
700Each retail store has the following monthly demand for television sets:Store Demand (sets)A. New York 150B. Dallas 250C. Detroit 200
600
Cost MatrixCosts of transporting television sets from the warehouses to the retail stores vary as a result of differences in modes of transportation and distances. The shipping cost per television set for each route is as follows:
To StoreFromWarehouse A B C
1 $16 $18 $112 14 12 133 13 15 17
Model DevelopmentThe model for this problem consists of nine decision variables, representing the number of television sets transported from each of the three warehouses to each of the three stores:xij = number of television sets shipped from warehouse i to store jwhere i = 1, 2, 3, and j = A, B, CThe objective function of the television manufacturer is to minimize the total transportation costs for all shipments. Thus, the objective function is the sum of the individual shipping costs from each warehouse to each store:minimize Z = $16x1A + 18x1B + 11x1C + 14x2A + 12x2B + 13x2C + 13x3A + 15x3B + 17x3CIn a "balanced" transportation model, supply equals demand such that all constraints are equalities; in an "unbalanced" transportation model, supply does not equal demand, and one set of constraints is ≤.
Constraintsx1A + x1B + x1C ≤ 300
x2A + x2B + x2C ≤ 200x3A + x3B + x3C ≤ 200
Supply Constraints
Demand Constraints
x1A + x2A + x3A = 150x1B + x2B + x3B = 250x1C + x2C + x3C = 200
Model Summaryminimize Z = $16x1A + 18x1B + 11x1C + 14x2A + 12x2B + 13x2C + 13x3A + 15x3B + 17x3Csubject to
The transportation model can also be optimally solved by Linear Programming
The personnel manager must schedule a security force in order to
satisfy staffing requirements shown below. Each worker has an
eight hour shift and there are six such shifts each day. The starting
and ending time for each of the 6 shifts is also given below. The
personnel manager wants to determine how many people need to
work each shift in order to minimize the total number of officers
employed while satisfying the staffing requirements.
Example 6: Scheduling Problem
Time # Officers Required Shift Shift Time12am-4am 5 1 12am-8am
7157129
4am-8am8am-noonnoon-4pm4pm-8pm8pm-12am
4am-noon8am-4pmnoon-8pm4pm-12am8pm-4am
23456
Let xi = number of officers who work on shift i, i = 1, ..., 6
Min z = x1 + x2 + x3 + x4 + x5 + x6 (Total number of officers employed)
s.t. x6 + x1 5 (12am-4am)
x1 + x2 7 (4am-8am)
x2 + x3 15 (8am-noon)
x3 + x4 7 (noon-4pm)
x4 + x5 12 (4pm-8pm)
x5 + x6 9 (8pm-12am)
xi 0, i = 1, ..., 6 (Nonnegativity)
Example 6: Scheduling Problem
Example 7: An Investment ExampleKathleen Allen, an individual investor, has $70,000 to divide among
several investments. The alternative investments are municipal bonds with an 8.5% annual return, certificates of deposit with a 5% return, treasury bills with a 6.5% return, and a growth stock fund with a 13% annual return. The investments are all evaluated after 1 year. Kathleen 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 investments and lessening the risk perceived by the investor:1. No more than 20% of the total investment should be in municipal bonds.2. The amount invested in certificates of deposit should not exceed the amount invested in the other three alternatives.3. At least 30% of the investment should be in treasury bills and certificates of deposit.4. To be safe, more should be invested in CDs and treasury bills than in municipal bonds and the growth stock fund, by a ratio of at least 1.2 to 1.Kathleen wants to invest the entire $70,000.
An Investment Example - ModelDecision Variables:x1 = amount ($) invested in municipal bonds
x2 = amount ($) invested in certificates of depositx3 = amount ($) invested in treasury billsx4 = amount ($) invested in growth stock fundThe Objective Function:Maximize Z = $0.085x1 + 0.05x2 + 0.065x3 +
0.130x4Constraints:x1 ≤$14,000
x2 ≤x1 + x3 + x4
x2 + x3 ≥$21,000
[(x2 + x3)/(x1 + x4)] ≥1.2
Model Summary
x1 + x2 + x3 + x4 = $70,000
Linear Programming (LP)
General Description
Problem: to determine decision variables
Objective: to maximize or minimize an objective function
Restrictions: represented by constraints
Solution methods: graphical, simplex, computer
General Form of a Linear Programming (LP)
Problem
MAX (or MIN): c1X1 + c2X2 + … + cnXn
Subject to a11X1 + a12X2 + … + a1nXn b1
:ak1X1 + ak2X2 + … + aknXn ≥ bk :am1X1 + am2X2 + … + amnXn = bm
X1 , X2 …… Xn ≥ 0Note: If all the functions in the model are linear, the
problem is a Linear Programming (LP) problem
Graphical solution is limited to linear programming models containing only two decision variables.
Graphical methods provide visualization of how a solution for a linear programming problem is obtained.
Graphical Solution of LP Models
Example 1 – Product mix problem - Beaver Creek Pottery Company
Complete Linear Programming Model:
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 404x2 + 3x2 120x1, x2 0
Coordinate AxesGraphical Solution of Maximization Model (1 of 11)
Figure: Coordinates for graphical analysis
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
X1 is bowls
X2 is mugs
Labor ConstraintGraphical Solution of Maximization Model (2 of 11)
Figure: Graph of labor constraint
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Labor Constraint AreaGraphical Solution of Maximization Model (3 of 11)
Figure: Labor constraint area
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Clay Constraint AreaGraphical Solution of Maximization Model (4 of 11)
Figure: The constraint area for clay
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Both ConstraintsGraphical Solution of Maximization Model (5 of 11)
Figure: Graph of both model constraints
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Feasible Solution AreaGraphical Solution of Maximization Model (6 of 11)
Figure: The feasible solution area
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Objective Function Solution = $800Graphical Solution of Maximization Model (7 of 11)
Figure: Objective function line for Z = $800
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Alternative Objective Function Solution LinesGraphical Solution of Maximization Model (8 of 11)
Figure: Alternative objective function lines for profits Z of $800, $1,200, and $1,600
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Optimal SolutionGraphical Solution of Maximization Model (9 of 11)
Figure: Identification of optimal solution point
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Optimal Solution CoordinatesGraphical Solution of Maximization Model (10 of 11)
Figure: Optimal solution coordinates
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
Extreme (Corner) Point SolutionsGraphical Solution of Maximization Model (11 of 11)
Figure: Solutions at all corner points
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x2 + 3x2 120
x1, x2 0
The optimal solution of a maximization problem is at the extreme point farthest to the origin.
Standard form requires that all constraints be in the form of equations (equalities).
A slack variable is added to a constraint to convert it to an equation (=).
A slack variable typically represents an unused resource.
A slack variable contributes nothing to the objective function value.
Slack Variables
Linear Programming Model: Standard Form
Max Z = 40x1 + 50x2 + 0s1 + 0s2
subject to:1x1 + 2x2 + s1 = 40 4x2 + 3x2 + s2 = 120 x1, x2, s1, s2 0Where:
x1 = number of bowls x2 = number of mugs s1, s2 are slack variables
Figure: Solutions at points A, B, and C with slack
LP Model Formulation – Minimization (1 of 6)
Chemical Contribution
Brand Nitrogen (lb/ bag)
Phosphate (lb/ bag)
Super-gro 2 4
Crop-quick 4 3
Two brands of fertilizer available - Super-gro, Crop-quick.
Field requires at least 16 pounds of nitrogen and 24 pounds of phosphate.
Super-gro costs $6 per bag, Crop-quick $3 per bag.
Problem: How much of each brand to purchase to minimize total cost of fertilizer given following data ?
Decision Variables: x1 = bags of Super-grox2 = bags of Crop-quick
The Objective Function:Minimize Z = $6x1 + 3x2
Where: $6x1 = cost of bags of Super-Gro
$3x2 = cost of bags of Crop-Quick
Model Constraints:2x1 + 4x2 16 lb (nitrogen constraint)4x1 + 3x2 24 lb (phosphate constraint)x1, x2 0 (non-negativity constraint)
LP Model Formulation – Minimization (2 of 6)
Minimize Z = $6x1 + $3x2
subject to: 2x1 + 4x2 16 4x2 + 3x2 24
x1, x2 0
Figure: Constraint lines for fertilizer model
Constraint Graph – Minimization (3 of 6)
Figure: Feasible solution area
Feasible Region– Minimization (4 of 6)
Minimize Z = $6x1 + $3x2
subject to: 2x1 + 4x2 16 4x2 + 3x2 24
x1, x2 0
Figure: Graph of the fertilizer example
Graphical Solutions – Minimization (5 of 6)
Minimize Z = $6x1 + $3x2 + 0s1 + 0s2
subject to: 2x1 + 4x2 – s1 = 16 4x2 + 3x2 – s2 = 24
x1, x2, s1, s2 0
The optimal solution of a minimization problem is at the extreme point closest to the origin.
A surplus variable is subtracted from a constraint to convert it to an equation (=).
A surplus variable represents an excess above a constraint requirement level.
A surplus variable contributes nothing to the calculated value of the objective function.
Subtracting surplus variables in the farmer problem constraints:
2x1 + 4x2 - s1 = 16 (nitrogen) 4x1 + 3x2 - s2 = 24 (phosphate)
Surplus Variables – Minimization (6 of 6)
For some linear programming models, the general rules do not apply.
Special types of problems include those with: Multiple optimal solutions Infeasible solutions Unbounded solutions
Irregular Types of Linear Programming Problems
Figure: Example with multiple optimal solutions
Multiple Optimal Solutions Beaver Creek Pottery
The objective function is parallel to a constraint line.
Maximize Z=$40x1 + 30x2
subject to: 1x1 + 2x2 404x1 + 3x2
120x1, x2 0
Where:x1 = number of bowlsx2 = number of mugs
An Infeasible Problem
Figure: Graph of an infeasible problem
Every possible solution violates at least one constraint:
Maximize Z = 5x1 + 3x2
subject to: 4x1 + 2x2 8 x1 4 x2 6 x1, x2 0
An Unbounded Problem
Figure: Graph of an unbounded problem
Value of the objectivefunction increases indefinitely:
Maximize Z = 4x1 + 2x2
subject to: x1 4 x2 2 x1, x2 0
Characteristics of Linear Programming Problems
A decision amongst alternative courses of action is required.
The decision is represented in the model by decision variables.
The problem encompasses a goal, expressed as an objective function, that the decision maker wants to achieve.
Restrictions (represented by constraints) exist that limit the extent of achievement of the objective.
The objective and constraints must be definable by linear mathematical functional relationships.
Proportionality - The rate of change (slope) of the objective function and constraint equations is constant.
Additivity - Terms in the objective function and constraint equations must be additive.
Divisibility - Decision variables can take on any fractional value and are therefore continuous as opposed to integer in nature.
Certainty - Values of all the model parameters are assumed to be known with certainty (non-probabilistic).
Properties of Linear Programming Models