Download linear programming

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
A store has two types of animal feed available. Type A contains 9 pounds of
oats and 2 pounds of corn per bag. Type B contains 5 pounds of oats and 10
pounds of corn per bag. A farmer wants to combine the two types so that the
resulting mixture has at least 46 pounds of oats and at least 24 pounds of
corn. The store only has 12 bags of type A feed and 14 bags of type B feed in
stock. Type A costs $3 per bag, and type B costs $4 per bag. How many bags
of each type should the farmer buy to minimize her cost?
I would first look for "constraints", such as
The store only has 12 bags of type A feed
14 bags of type B
How many bags of each type should the farmer buy to minimize her cost?
The constraints on the number of A's and B's, and the fact the farmer is buying so many
A and B implies we will have linear equations with the number of A and the number of B
as the variables. If we have "x" number of type A and "y" number of type B, we should
expect constraints of the form a x + b y = c, i.e. lines.
The first constraints we find are:
x ≤12
y≤14
Type A contains 9 pounds of oats and 2 pounds of corn
Type B contains 5 pounds of oats and 10 pounds of corn
A mixture has at least 46 pounds of oats
A mixture of x bags of A and y bags of B will have 9x + 5y pounds of oats.
We have the constraint
9x +5y≥46
mixture has at least 24 pounds of corn
A mixture of x bags of A and y bags of B will have 2x + 10y pounds of oats.
We have the constraint
2x +10y≥24
Plot these constraints
Now find the intersection of the various lines. At each intersection point, evaluate the
cost function.
Type A costs $3 per bag, and type B costs $4 per bag.
The cost function is: Cost= 3x + 4y
Evaluating at point A (0,14),
cost= 4*14=
point B (12,14)
cost=3*12+4*14=
point C (12,0)
cost=3*12=
point D (4.25,1.55)
cost=3*4.25+4*1.55=
point E (0, 9.2)
cost= 4*9.2=
56
92
36
18.95
36.80
The closest whole numbers to point D (4.25,1.55) that is within the region is (4,2) at a cost of $20