I want to formulate an LP problem of the problem below in the Standard form and then solve (Textbook i use is "linear programming by Vasek Chvatal).
"A farmer grows three crops: corn, oats, and soybeans. He mixes these together to feed his own cows and pigs. At least 40% of the feed mix for the cows must be corn. THe feed mix for the pigs must contain at least twice as much soybeans as corn. He has harvested 1000 bushels of corn, 500 bushels of oats, and 1000 bushels of soybeans. He needs 1000 bushels of each kind of feed mix for his livestock. The unused corn, oats, and soybeans can be sold for $4, $3.50 and $3.25 a bushels, respectively (and thus, these amounts also represent the cost of the crops used to feed the livestock). How many bushels of each crop should be used in each type of feed mix in order to produce sufficient food for the livestock at minimal cost?
This problem is a nice one which I pretty much like it. I go through the line by line of the problem statement and report the procedure.
we have three crops: corn, oats, soybean. We have two feeds: Feed1(cow) and Feed2(pig).
corn_1 and corn_2 are the amount of corn used in each feed 1 and 2 respectively. Similar holds for oats_1 and oats_2 and soybean_1 and soybean_2.
He needs 1000 bushels of each kind of feed mix for his livestock.
At least 40% of the feed mix for the cows must be corn.
From 1 and 2 we have that:
constraint1: corn_1 >= (40/100)*1000;
also from 1)
constraint2: corn_1+oats_1+soybeans_1 ==1000;
3)The feed mix for the pigs must contain at least twice as much soybeans as corn.
constraint3: 2*soybean_2<= corn_2
4) from 1) we have ...
Linear programming simplex method is discussed.