Linear Programming
Alayssa Silva July 4, 2012
What is Linear Programming (LP)?
A particular type of mathematical model in which relationships involving the variables are linear. This model use a mathematical technique called linear programming which determines the best or optimal decision even there are thousands of variables and relationships. It has been applied to a wide variety of decision problems in business and the public sector. The LP model is designed maximize (minimize) an objective function of the form.
f =C1X1 + C2X2 + . . . = CnXn
Where f is same economic objective such as profit, production, cost, workweeks, or tons shipped.
= AnXn < B1
Where: A coefficients are constraints B1 restricts f1. The constraints are mathematical. relationships expressed in terms of linear equations or linear equalities. . .What is Linear Programming (LP)?
LP is composed of two main parts namely: objective function and constraints. A1X1 + A2X2 + . The objective function is either to maximize or to minimize. the objective function
.
Scheduling school buses to minimize total distance traveled Allocating police patrol units to high crime areas in order to minimize response time to 911 calls
3.
Developing a production schedule that will satisfy future demands for a firm’s product and at the same time minimize total production and inventory costs
Allocating space for a tenant mix in a new shopping mall so as to maximize revenues to the leasing company
8. 6.
7. 2.
Scheduling tellers at banks so that needs are met during each hour of the day while minimizing the total cost of labor
Selecting the product mix in a factory to make best use of machine.
4.
.and laborhours available while maximizing the firm’s profit Picking blends of raw materials in feed mills to produce finished feed combinations at minimum costs Determining the distribution system that will minimize total shipping cost
5.Linear Programming Applications
1.
Define the specific decision variables This is assigning variables to the given products. List down the constraints that affect the decision. Example: Maximize: Contribution to profit Minimize: Cost 3. Identify the objective function which is either to maximize or to minimize.Formulation of Linear Programming Models
Linear programming problems can be formulated in a systematic way by following these simple steps: 1. This is the objective that you are trying to achieve in solving the problem.
. There are different types of constraints which can be found on a given word problem solving. 2.
Example: There are only two machines available. funds or other resources. labor. Market Constraints These are limitations (either lower or upper limits or both) on how much upper can be sold or used. machine A and machine B. space. while machine B is available for 20 hrs. Capacity Constraints There are limitations on the amount of equipment . Availability Constraints These are limitations on the available raw materials.Formulation of Linear Programming Models
Types of constraints a. Machine A is available for 12 hours. c. b.
. or stuff availability.
Formulation of Linear Programming Models
d.
e. such constraints came from accountancy definitions. usually defining the output of products.
. Types of constraints Quality or Blending Constraints These are limitations on the mixes of ingredients. often.
4. Definitional Constraints These are constraints that define a given variable. Define the specific constraints using the decision variables. usually defining the output of products.
f. Production Technology or Material Balance Constraints These are limitations on the mixes of ingredients.
Solution: Following the steps in formulating a linear program. which requires two (2) oz of vanish . how many of each type should he make to maximize his profits? Formulate the linear program. He has eight oz of varnish available in stock and he can work 12 hours. It takes him three (3) hours to assemble a pine clock. Objective function MAXIMIZE: Profit = P100x + P120y
. If he makes P100 profit on each pine clock and P120 on each molave clock.Problem Example 1: A clock maker makes two types of wood clock to sell at various malls. 1. which takes four oz of varnish. It takes four (4) hours to assemble a molave clock. we have. Let x = number of pine clock y = number of molave clock 2.
Specific constraints Varnishing 3x + 4y ≤ 12 Processing time 2x + 4y ≤ 16 x≥0 y≥0 Thus.Problem Example 1: (cont’n) 3.processing time 4. Constraints Raw materials and process requirements like . the linear program would≥ be: MAXIMIZE : Profit = P100x + P120y SUBJECT TO: Varnishing 3x + 4y ≤ 12 Processing time 2x + 4y ≤ 16 x≥0 y≥0
.varnish requirement .
.Graphical Method of Linear Programming
The set of all points that satisfy all the constraints of the model is called a feasible region. 2. Solve for the coordinates of the vertices of the feasible region. Substitute the coordinates of the vertices of the feasible region to the objective function. Steps to be followed in LP Graphical Method 1. 3. Formulate your decision. Graph the inequalities and shade the feasible region. If it is maximization. However. choose the vertex that will give you the lowest value. it has been proven that the maximum or minimum value always occurs at a vertex of the feasible region. 5. 4. Formulate the linear program.
Shader BlueBerry. a portable music player
2. an internetconnected color telephone
Determine the mix of products that will produce the maximum profit
© 2008 Prentice Hall. Shader Xpod. Inc.
B – 11
.Formulating LP Problems
The productmix problem at Shader Electronics Two products 1.
Formulating LP Problems
Hours Required to Produce 1 Unit Department Xpods (X1) BlueBerrys (X2) Available Hours This Week
Electronic Assembly Profit per unit
4 2 P7
3 1 P5
240 100
Decision Variables: X1 = number of Xpods to be produced X2 = number of BlueBerrys to be produced
© 2008 Prentice Hall. Inc.1
B – 12
.
Table B.
Formulating LP Problems
Objective Function: Maximize Profit = P7X1 + P5X2 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
© 2008 Prentice Hall. B – 13
. Inc.
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)
© 2008 Prentice Hall. Inc. B – 14
.
B – 15
. Inc.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. Move this line outwards until the optimal point is identified
© 2008 Prentice Hall. Identify the feasible solution space 3. Create an isoprofit line based on the objective function 4.
Inc.3
© 2008 Prentice Hall.
Number of BlueBerrys
Assembly (constraint B)
Electronics (constraint A) Feasible region
  20   40   60   80   100
– 0
X1
B – 16
Number of Xpods
.Graphical Solution
X2
100 – – 80 – – 60 – – 40 – – 20 – – Figure B.
Inc.3
© 2008 Prentice Hall.
X1
B – 17
Number of Xpods
.Graphical Solution
IsoProfit Line Solution Method X
2
Choose a possible value for the objective function 100 –
–
Number of Watch TVs
80 – – 60 – 40 – – 20 – – – 0
Assembly (constraint B) P210 = 7X1 + 5X2
Solve for the axis intercepts of the function and plot the line –
Electronics (constraint A) Feasible 42 X2 = region
  20   40 
X1 = 30
 60   80   100
Figure B.
Number of BlueBerrys
P210 = P7X1 + P5X2 (0. Inc. 42)
(30. 0)
  20   40   60   80   100
– 0
X1
B – 18
Number of Xpods
.4
© 2008 Prentice Hall.Graphical Solution
X2
100 – – 80 – – 60 – – 40 – – 20 – – Figure B.
Graphical Solution
X2
100 – –
P350 = P7X1 + P5X2 P280 = P7X1 + P5X2 P210 = P7X1 + P5X2
Number of BlueBeryys
80 – – 60 – – 40 – – 20 – – – 0   20   40 
P420 = P7X1 + P5X2
Figure B.5
© 2008 Prentice Hall.
 60

 80

 100
X1
B – 19
Number of Xpods
. Inc.
Graphical Solution
X2
100 – –
Maximum profit line
Number of BlueBerrys
80 – – 60 – – 40 – – 20 – – – 0   20   40   60
Optimal solution point (X1 = 30.6
© 2008 Prentice Hall.
 80

 100
X1
B – 20
Number of Xpods
. X2 = 40) P410 = P7X1 + P5X2

Figure B. Inc.
which should be made to maximize profit if Dept I and II have 150 and 60 minutes available respectively. What is the maximum and minimum profit? Solution: First. Find the number of units of A and B. Profit contribution is P5/unit of A and P8/unit of B. One unit of product B requires 4 minutes in Dept I and 2 minutes in Dept II.Graphical Method of Linear Programming: Problem Example 1
To make one unit of product A requires 3 minutes in Dept. we formulate the linear program Let x= number of units of product A y = number of units of product B P = incremental profit
. I and 1 minute in Dept II.
Objective Function: To maximize: P = P5x + P8y Constraints: Subject to: time in Dept I: 3x + 4y ≤ 150 time in Dept II: x + 2y ≤ 60 x≥0 y≥0 Then. we graph the constraints by finding the x and y intercepts
xintercept yintercept (0.30)
3x + 4y ≤ 150 x + 2y ≤ 60 x≥0 y≥0
3x + 4y = 150 x + 2y = 60 x=0 y=0
(50.
. 0) (60. 37⅟2) (0.0)
Notice that the constraints x ≥ 0 and y ≥ 0 restrict the graph to Quadrant I.
YValues
50 45 40 35 30 25 20 15 10 5 0 YValues
0
50
100
.