Вы находитесь на странице: 1из 18

LINEAR PROGRAMMING

Linear programming model, or LP model, is a


particular type of mathematical model in which
relationships involving the variables are linear.
This model uses a mathematical technique called
linear programming which determines the best or
optimal decision even there are thousands of
variables and relationships.
Linear programming has been applied to a wide
variety of decision problems in business and in
public sector. The linear programming is
designed to 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.

Linear programming is composed of two main parts


namely: objective function and constraints. The
objective function is either to maximize or minimize.
The constraints are mathematical, relationship
expressed, in terms of linear equations or linear
inequalities.
Linear programming problems can be solved by graphical method if there are only two variables
involved. In case there are more than two variables involved, the simplex method can be used. The
simplex method is the most common.

. A farmer has 10 acres to plant in wheat and rye. He has to plant


1

at least 7 acres. However, he has only $1200 to spend and each


acre of wheat costs $200 to plant and each acre of rye costs $100
to plant. Moreover, the farmer has to get the planting done in 12
hours and it takes an hour to plant an acre of wheat and 2 hours to
plant an acre of rye. If the profit is $500 per acre of wheat and $300
per acre of rye how many acres of each should be planted to
maximize profits?
Steps:
0. Read the whole problem.
1. Define your unknowns.
2. Express the objective function and the constraints.
3. Graph the constraints.
4. Find the corner points to the region of feasible solutions.
5. Evaluate the objective function at all the feasible corner points.

1. Define your unknowns

In this case the question is how many acres of wheat and how many acres of rye should be planted.

Let x = the number of acres of wheat

and y = the number of acres of rye.

2. Express the objective and the constraints.

First, the objective. The object is to maximize profits. Each acre of wheat brings in $500 and each
acre of rye brings in $300.

Profit = 500x + 300y

After getting the unknowns defined and the objective expressed, everything else is a constraint.

The first constraint is the acreage constraint. The farmer has only 10 acres to plant. So the total
number of acres has to be less than or equal to 10. There is another acreage constraint. The farmer
has to plant at least 7 acres.

The next constraint is the cost constraint. The farmer has only $1200 to spend on the planting.

Finally there is the time constraint. The planting has to be done in 12 hours. So the constraints are expressed as

and of course the implied constraints

3. Graph the constraints.

The implied constraints tell us that the feasible solutions will all lie in the upper right quadrant of the plane.

First we find the intercepts

Let us first graph the acreage constraints. The first acreage constraint has 10 for both the x and y intercepts.
Plot 10 on both the x and y axes, and connect the points with a straight line. Next decide which side of the line is the side
that contains solutions to the inequality. Pick a point which is not on the line. In this case the origin is the simplest such
point with which to work. Does the origin satisfy this constraint?

At the origin, no acres are planted. Does the farmer have enough acres for this? The answer is yes. So the origin is on the
right side of this line. Shade in all of the points in the upper right quadrant which are on the same side of the line as the
origin.

The lower acreage constraint has x and y intercepts which are both equal to 7.

In this case, the origin is not a solution to this constraint. At the origin, the farmer is not planting any acres of anything, but
this constraint says that the farmer needs to plant at least 7 acres. If the origin is not on the right side, the other side is the
right side. The region of feasible solutions has been cut down to the shaded area above.

In general, if both unknowns are on the same side and all the coefficients are positive, the line will have positive x and y
intercepts, and the side toward the origin will be the less than side and the side away from the origin will be the greater
than side.

Next graph the cost constraint. It has an x intercept of 6 and a y intercept of 12.
Since this is a "less than" constraint the side on the same side as the origin is shaded.

Finally there is the time constraint. It has an x intercept of 12 and a y intercept of 6.

4. Find the feasible corner points

The feasible corner points are the ones at the corners of the shaded region. To find them we identify the
equations which are associated with the lines that intersect at the points.

We solve these systems simultaneously.

x=5

We substitute this into x + y = 7 and get

y=2

so
A = (5, 2)

x=4

We substitute this into x + 2y = 12

and

y=4

so

B = (4, 4)

If we subtract the two equations we get

y=5

If we substitute that into x + y = 7, we get

x=2

so

C = (2, 5)

We see that none of the feasible corner points is on the upper acreage constraint, the fact that the farmer had
only 10 acres. It turns out to be what is called a superfluous constraint. The most number of acres that can be
planted is 8 by planting 4 acres of each crop. If all of the other constraints are satisfied, the farmer will
automatically be planting less than 10 acres.

5. Evaluate the objective function in all of the feasible corner points.

A = (5, 2)

Profit = $500(5) + $300(2) = $2500 + $600 = $3100

B = (4, 4)

Profit = $500(4) + $300(4) = $2000 + 1200 = $3200

C = (2, 5)

Profit = $500(2) + $300(5) = $1000 + $1500 = $2500

The winner is B:

The maximize the profit of $3200 is obtained by planting 4 acres of each crop.
If we think about it, this makes sense. C can be seen to be the least profitable corner point. You are planting the
fewest number of acres and you are planting more of the less profitable rye and less of the more profitable
wheat. The real question is whether A or B will be more profitable. At B you are planting more acres than at A,
but at A you are planting more of the more profitable wheat and less of the less profitable rye. One way to
decide is to actually compute the profit at both points and see which one would be best.

2. Agold processor has two sources of gold ore, source A and source B.
In order to keep his plant running, at least three tons of ore must be
processed each day. Ore from source A costs $20 per ton to process,
and ore from source B costs $10 per ton to process. Costs must be
kept to less than $80 per day. Moreover, Federal Regulations require
that the amount of ore from source B cannot exceed twice the amount
of ore from source A. If ore from source A yields 2 oz. of gold per ton,
and ore from source B yields 3 oz. of gold per ton, how many tons of
ore from both sources must be processed each day to maximize the
amount of gold extracted subject to the above constraints?

Steps

0. Read the whole problem.


1. Define your unknowns.
2. Express the objective function and the constraints.
3. Graph the constraints.
4. Find the cornerpoints to the region of feasible solutions.
5. Evaluate the objective function at all the feasible corner points.

In this case they are looking for the number of tons of ore from the two sources which should be processed each
day to maximize the amount of gold extracted.

Step 1. Define the unknowns

Let x = the number of tons from source A

and y = the number of tons from source B

Step 2. Express the objective and the constriants.

The objective is to maximize the amount of the gold yield. Since each ton of ore from source A yields 2oz. of
gold and each ton of ore from source B yields 3oz. of gold, the amount of gold recovered will be

2x + 3y

After getting the unknowns and the objective out of the way, everything else in the problem is a constraint. The
constraints are the

processing

cost

federal regulations
Of course there are also the implied constraints

We are not going to process an negative number of tons of ore.

Step 3. Graph the constraints

The implied constraints tell us that the graph will be in the upper right quadrant of the plane.

When we graph the first constraint,

the x and y intercepts are both 3

Since this is a "greater than" constraint the side of the line where the x's and y's get bigger will be the correct
side. This region goes on forever.

In the next constraint,

the x intercept is 80/20 = 4, and the y intercept is 80/10 = 8. There is enough money to process 4 tons of ore
from source A if we don't process any ore from source B, whereas, if we just use ore from source B, there will
be enough money to process 8 tons.

Since this is a "less than" constraint, the points on the side where x and y get small should be shaded. The set of
points which satisfy both of theses constraints are shaded above.

Finally there is the federal regulations constraint.


In this type of equation, the x and y intercept will both be at (0, 0), so we will need to plot at least one other
point. If we let x = 4 then if y = 2x we will have y = 8. Plot the point (4, 8) and connect it with (0, 0).

To tell which side of this line is which, notice that the x's are on the large side of the inequality and the y's are
on the small side. So we shade the side of the line where the x's are big and the y's are small.

We label the lines with the equations from which they come so that we can

4. Find the feasible corner points.

Where we see a y we substitute 2x, and the first equation becomes

x + 2x = 3
3x = 3
x=1

If x = 1 and y = 2x then y = 2. Hence

A = (1, 2)

Again, where we see a y we substitute 2x, and the first equation becomes

20x + 10(2x) = 80
20x + 20x = 80
40x = 80
x=2

If x = 2 and y = 2x then y = 4. Hence

B = (2, 4)
C is the x intercept for x + y = 3, so

C = (3, 0)

D is the x intercept for 20x + 10y = 80 so

D = (4, 0)

5. Evaluate the objective function.

At (1, 2) we get 2(1) + 3(2) = 8oz. of gold.

At (2, 4) we get 2(2) + 3(4) = 16oz. of gold.

At (3, 0) we get 2(3) + 3(0) = 6 oz. of gold.

At (4, 0) we get 2(4) + 3(0) = 8oz. of gold.

The maximum yield of gold is 16oz. by processing 2 tons of ore from source A and 4 tons from source B.

 A calculator company produces a scientific calculator and a


graphing calculator. Long-term projections indicate an
expected demand of at least 100 scientific and 80 graphing
calculators each day. Because of limitations on production
capacity, no more than 200 scientific and 170 graphing
calculators can be made daily. To satisfy a shipping contract,
a total of at least 200 calculators much be shipped each day.
If each scientific calculator sold results in a $2 loss, but each
graphing calculator produces a $5 profit, how many of each
type should be made daily to maximize net profits?

The question asks for the optimal number of calculators, so my


variables will stand for that:

x: number of scientific calculators produced


y: number of graphing calculators produced

Since they can't produce negative numbers of calculators, I have


the two constraints, x > 0 and y > 0. But in this case, I can ignore
these constraints, because I already have that x > 100 and y > 80.
The exercise also gives maximums: x < 200 and y < 170. The
minimum shipping requirement gives me x + y > 200; in other
words, y > –x + 200. The revenue relation will be my optimization
equation: R = –2x + 5y. So the entire system is:

R = –2x + 5y, subject to:


100 < x < 200
80 < y < 170
y > –x + 200
The feasibility region graphs as: Copyright © Elizabeth Stapel
2006-2011 All Rights Reserved

When you test the corner points at (100, 170), (200, 170), (200, 80), (120,
80), and (100, 100), you should obtain the maximum value of R = 650 at
(x, y) = (100, 170). That is, the solution is "100 scientific calculators and
170 graphing calculators".

 You need to buy some filing cabinets. You know that Cabinet
X costs $10 per unit, requires six square feet of floor space,
and holds eight cubic feet of files. Cabinet Y costs $20 per
unit, requires eight square feet of floor space, and holds
twelve cubic feet of files. You have been given $140 for this
purchase, though you don't have to spend that much. The
office has room for no more than 72 square feet of cabinets.
How many of which model should you buy, in order to
maximize storage volume?

The question ask for the number of cabinets I need to buy, so my


variables will stand for that:

x: number of model X cabinets purchased


y: number of model Y cabinets purchased

Naturally, x > 0 and y > 0. I have to consider costs and floor space
(the "footprint" of each unit), while maximizing the storage volume,
so costs and floor space will be my constraints, while volume will
be my optimization equation.

cost: 10x + 20y < 140, or y < –( 1/2 )x + 7


space: 6x + 8y < 72, or y < –( 3/4 )x + 9
volume: V = 8x + 12y

This system (along with the first two constraints) graphs as:
When you test the corner points at (8, 3), (0, 7), and (12, 0), you should
obtain a maximal volume of 100 cubic feet by buying eight of model X
and three of model Y.

A school is preparing a trip for 400 students. The company who is providing the transportation has 10 buses of
50 seats each and 8 buses of 40 seats, but only has 9 drivers available. The rental cost for a large bus is $800
and $600 for the small bus. Calculate how many buses of each type should be used for the trip for the least
possible cost.

1Choose the unknowns.

x = small buses

y = big buses

2Write the objective function.

f(x, y) = 600x + 800y

3Write the constraints as a system of inequalities.

40x + 50y ≥ 400

x+y≤9

x≥0

y≥0

4 Find the set of feasible solutions that graphically represent the constraints.
5 Calculate the coordinates of the vertices from the compound of feasible solutions.

6 Calculate the value of the objective function at each of the vertices to determine which of them has the
maximum or minimum values.

f(0, 8) = 600 · 0 + 800 · 8 = $6,400

f(0, 9) = 600 · 0 + 800 · 9 = $7,200

f(5, 4) = 6 00 · 5 + 800 · 4 = $6,200 € Minimum

The minimum cost is $6,200. This is acheived with 4 large and 5 small buses.

A B Minimal

Shirts 1 3 200

Pants 1 1 100
A transport company has two types of trucks, Type A and Type B. Type A has a refrigerated capacity of 20 m3
and a non-refrigerated capacity of 40 m3 while Type B has the same overall volume with equal sections for
refrigerated and non-refrigerated stock. A grocer needs to hire trucks for the transport of 3,000 m3 of
refrigerated stock and 4,000 m3 of non-refrigerated stock. The cost per kilometer of a Type A is $30, and $40
for Type B. How many trucks of each type should the grocer rent to achieve the minimum total cost?

1Choose the unknowns.

x = Type A trucks

y = Type B trucks

2Write the objective function.

f(x,y) = 30x + 40y

3Write the constraints as a system of inequalities.

A B Total

Refrigerated 20 30 3 000

Non-
40 30 4 000
refrigerated

20x + 30y ≥ 3 000

40x + 30y ≥ 4 000

x≥0

y≥0

4 Find the set of feasible solutions that graphically represent the constraints.
5 Calculate the coordinates of the vertices from the compound of feasible solutions.

6 Calculate the value of the objective function at each of the vertices to determine which of them has the
maximum or minimum values.

f(0, 400/3) = 30 · 0 + 40 · 400/3 = 5,333.332

f(150, 0) = 30 · 150 + 40 · 0 = 4,500

As x and y must be natural numbers round the value of y.

f(50, 67) = 30 · 50 + 40 ·67 = 4,180 Minimum

The minimum cost is $4,180. To achieve this 50 trucks of Type A and 67 trucks of Type B are needed.

A B Minimal

Shirts 1 3 200
Pants 1 1 100

A transport company has two types of trucks, Type A and Type B.


Type A has a refrigerated capacity of 20 m3 and a non-refrigerated
capacity of 40 m3 while Type B has the same overall volume with
equal sections for refrigerated and non-refrigerated stock. A grocer
needs to hire trucks for the transport of 3,000 m3 of refrigerated stock
and 4,000 m3 of non-refrigerated stock. The cost per kilometer of a
Type A is $30, and $40 for Type B. How many trucks of each type
should the grocer rent to achieve the minimum total cost?
1Choose the unknowns.

x = Type A trucks

y = Type B trucks

2Write the objective function.

f(x,y) = 30x + 40y

3Write the constraints as a system of inequalities.

A B Total

3
Refrigerated 20 30
000

Non- 4
40 30
refrigerated 000

20x + 30y ≥ 3 000

40x + 30y ≥ 4 000

x≥0

y≥0

4 Find the set of feasible solutions that graphically represent the constraints.
5 Calculate the coordinates of the vertices from the compound of feasible solutions.

6 Calculate the value of the objective function at each of the vertices to determine which of them has the
maximum or minimum values.

f(0, 400/3) = 30 · 0 + 40 · 400/3 = 5,333.332

f(150, 0) = 30 · 150 + 40 · 0 = 4,500

As x and y must be natural numbers round the value of y.

f(50, 67) = 30 · 50 + 40 ·67 = 4,180 Minimum

The minimum cost is $4,180. To achieve this 50 trucks of Type A and 67 trucks of Type B are needed.

A B Minimal

Shirts 1 3 200
Pants 1 1 100

A store wants to liquidate 200 of its shirts and 100 pairs of pants from last season. They have decided to put
together two offers, A and B. Offer A is a package of one shirt and a pair of pants which will sell for $30. Offer
B is a package of three shirts and a pair of pants, which will sell for $50. The store does not want to sell less
than 20 packages of Offer A and less than 10 of Offer B. How many packages of each do they have to sell to
maximize the money generated from the promotion?

1Choose the unknowns.

x = number of packages of Offer A

y = number of packages of Offer B

2Write the objective function.

f(x, y) = 30x + 50y

3Write the constraints as a system of inequalities.

A B Minimal

Shirts 1 3 200

Pants 1 1 100

x + 3y ≤ 200

x + y ≤ 100

x ≥ 20

y ≥ 10

4 Find the set of feasible solutions that graphically represent the constraints.
5 Calculate the coordinates of the vertices from the compound of feasible solutions.

6 Calculate the value of the objective function at each of the vertices to determine which of them has the
maximum or minimum values.

f(x, y) = 30 · 20 + 50 · 10 = $1,100

f(x, y) = 30 · 90 + 50 · 10 = $3,200

f(x, y) = 30 · 20 + 50 · 60 = $3,600

f(x, y) = 30 · 50 + 50 · 50 = $4,000 Maximum

50 packages of each offer generates a maximum amount of $4,000 in sales.

Вам также может понравиться