You are on page 1of 24

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.

What is Linear Programming (LP)?


LP is composed of two main parts namely: objective function and constraints. The objective function is either to maximize or to minimize. The constraints are mathematical, relationships expressed in terms of linear equations or linear equalities. A1X1 + A2X2 + . . . = AnXn < B1

Where: A coefficients are constraints B1 restricts f1, the objective function

Linear Programming Applications


1. 2. 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.
4.

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- and labor-hours available while maximizing the firms 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. 6.

7.

Developing a production schedule that will satisfy future demands for a firms 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.

Formulation of Linear Programming Models


Linear programming problems can be formulated in a systematic way by following these simple steps: 1. Define the specific decision variables This is assigning variables to the given products. 2. Identify the objective function which is either to maximize or to minimize. This is the objective that you are trying to achieve in solving the problem. Example: Maximize: Contribution to profit Minimize: Cost 3. List down the constraints that affect the decision. There are different types of constraints which can be found on a given word problem solving.

Formulation of Linear Programming Models


Types of constraints a. Capacity Constraints There are limitations on the amount of equipment , space, or stuff availability. Example: There are only two machines available, machine A and machine B. Machine A is available for 12 hours, while machine B is available for 20 hrs. b. Market Constraints These are limitations (either lower or upper limits or both) on how much upper can be sold or used. c. Availability Constraints These are limitations on the available raw materials, labor, funds or other resources.

Formulation of Linear Programming Models


d. Types of constraints Quality or Blending Constraints These are limitations on the mixes of ingredients, usually defining the output of products. Production Technology or Material Balance Constraints These are limitations on the mixes of ingredients, usually defining the output of products. Definitional Constraints These are constraints that define a given variable, often, such constraints came from accountancy definitions. Define the specific constraints using the decision variables.

e.

f.

4.

Problem Example 1: A clock maker makes two types of wood clock to sell at various malls. It takes him three (3) hours to assemble a pine clock, which requires two (2) oz of vanish . It takes four (4) hours to assemble a molave clock, which takes four oz of varnish. He has eight oz of varnish available in stock and he can work 12 hours. If he makes P100 profit on each pine clock and P120 on each molave clock, how many of each type should he make to maximize his profits? Formulate the linear program. Solution: Following the steps in formulating a linear program, we have, 1. Let x = number of pine clock y = number of molave clock 2. Objective function MAXIMIZE: Profit = P100x + P120y

Problem Example 1: (contn) 3. Constraints Raw materials and process requirements like - varnish requirement - processing time 4. Specific constraints Varnishing 3x + 4y 12 Processing time 2x + 4y 16 x0 y0 Thus, the linear program would be: MAXIMIZE : Profit = P100x + P120y SUBJECT TO: Varnishing 3x + 4y 12 Processing time 2x + 4y 16 x0 y0

Graphical Method of Linear Programming


The set of all points that satisfy all the constraints of the model is called a feasible region. However, it has been proven that the maximum or minimum value always occurs at a vertex of the feasible region. Steps to be followed in LP Graphical Method 1. Formulate the linear program. 2. Graph the inequalities and shade the feasible region. 3. Solve for the coordinates of the vertices of the feasible region. 4. Substitute the coordinates of the vertices of the feasible region to the objective function. 5. Formulate your decision. If it is maximization, choose the vertex that will give you the lowest value.

Formulating LP Problems
The product-mix problem at Shader Electronics Two products 1. Shader X-pod, a portable music player

2. Shader BlueBerry, an internetconnected color telephone


Determine the mix of products that will produce the maximum profit

2008 Prentice Hall, Inc.

B 11

Formulating LP Problems
Hours Required to Produce 1 Unit Department X-pods (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 X-pods to be produced X2 = number of BlueBerrys to be produced


2008 Prentice Hall, Inc.

Table B.1

B 12

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, Inc. B 13

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

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
2008 Prentice Hall, Inc. B 15

Graphical Solution
X2
100 80 60 40 20 Figure B.3
2008 Prentice Hall, Inc.

Number of BlueBerrys

Assembly (constraint B)

Electronics (constraint A) Feasible region


| | 20 | | 40 | | 60 | | 80 | | 100

| 0

X1
B 16

Number of X-pods

Graphical Solution
Iso-Profit 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.3
2008 Prentice Hall, Inc.

X1
B 17

Number of X-pods

Graphical Solution
X2
100 80 60 40 20 Figure B.4
2008 Prentice Hall, Inc.

Number of BlueBerrys

P210 = P7X1 + P5X2 (0, 42)

(30, 0)
| | 20 | | 40 | | 60 | | 80 | | 100

| 0

X1
B 18

Number of X-pods

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, Inc.

| 60

| 80

| 100

X1
B 19

Number of X-pods

Graphical Solution
X2
100

Maximum profit line

Number of BlueBerrys

80 60 40 20 | 0 | | 20 | | 40 | | 60

Optimal solution point (X1 = 30, X2 = 40) P410 = P7X1 + P5X2

Figure B.6
2008 Prentice Hall, Inc.

| 80

| 100

X1
B 20

Number of X-pods

Graphical Method of Linear Programming: Problem Example 1


To make one unit of product A requires 3 minutes in Dept. I and 1 minute in Dept II. One unit of product B requires 4 minutes in Dept I and 2 minutes in Dept II. Profit contribution is P5/unit of A and P8/unit of B. Find the number of units of A and B, 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, we formulate the linear program Let x= number of units of product A y = number of units of product B P = incremental profit

Objective Function: To maximize: P = P5x + P8y Constraints: Subject to: time in Dept I: 3x + 4y 150 time in Dept II: x + 2y 60 x0 y0 Then, we graph the constraints by finding the x and y intercepts
x-intercept y-intercept (0, 372) (0,30)

3x + 4y 150 x + 2y 60 x0 y0

3x + 4y = 150 x + 2y = 60 x=0 y=0

(50, 0) (60,0)

Notice that the constraints x 0 and y 0 restrict the graph to Quadrant I.

Y-Values
50 45 40 35 30 25 20 15 10 5 0 Y-Values

50

100

You might also like