document.write( "Question 1166325: A major coffee supplier has warehouses in Seattle and San Jose.
\n" ); document.write( "The coffee supplier receives orders from coffee retailers in Salt Lake City and Reno.
\n" ); document.write( "The retailer in Salt Lake City needs 400 pounds of coffee and the retailer in Reno needs 350 pounds of coffee.
\n" ); document.write( "The Seattle warehouse has 700 pounds available,
\n" ); document.write( "and the warehouse in San Jose has 500 pounds available.
\n" ); document.write( "The cost of shipping from Seattle to Salt Lake City is $2.50 per pound,
\n" ); document.write( "from Seattle to Reno $3.50 per pound,
\n" ); document.write( "from San Jose to Salt Lake City $2 per pound
\n" ); document.write( "and from San Jose to Reno $2.50 per pound.
\n" ); document.write( "Find the number of pounds to be shipped from each warehouse to each retailer to minimize the cost.
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #790820 by ikleyn(52778)\"\" \"About 
You can put this solution on YOUR website!
.
\n" ); document.write( "A major coffee supplier has warehouses in Seattle and San Jose.
\n" ); document.write( "The coffee supplier receives orders from coffee retailers in Salt Lake City and Reno.
\n" ); document.write( "The retailer in Salt Lake City needs 400 pounds of coffee and the retailer in Reno needs 350 pounds of coffee.
\n" ); document.write( "The Seattle warehouse has 700 pounds available,
\n" ); document.write( "and the warehouse in San Jose has 500 pounds available.
\n" ); document.write( "The cost of shipping from Seattle to Salt Lake City is $2.50 per pound,
\n" ); document.write( "from Seattle to Reno $3.50 per pound,
\n" ); document.write( "from San Jose to Salt Lake City $2 per pound
\n" ); document.write( "and from San Jose to Reno $2.50 per pound.
\n" ); document.write( "Find the number of pounds to be shipped from each warehouse to each retailer to minimize the cost.
\n" ); document.write( "~~~~~~~~~~~~~~~\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "Let X  be the amount shipped from Seattle  to Salt Lake City, in pounds.\r\n" );
document.write( "\r\n" );
document.write( "Let Y  be the amount shipped from Seattle  to Reno.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Then  the amount shipped from San Jose to Reno is (350-Y) pounds,\r\n" );
document.write( "\r\n" );
document.write( "while the amount shipped from San Jose to Salt Lake City is (400-X) pounds.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The constraints are\r\n" );
document.write( "\r\n" );
document.write( "    0 <= X <= 400                                    (1)\r\n" );
document.write( "\r\n" );
document.write( "    0 <= Y <= 350                                    (2)\r\n" );
document.write( "\r\n" );
document.write( "    X + Y <= 700                                     (3)\r\n" );
document.write( "\r\n" );
document.write( "    (400-X) + (350-Y) <= 500,  or  X + Y >= 250.     (4)\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The objective function to minimize is the cost of shipping\r\n" );
document.write( "\r\n" );
document.write( "    F = 2.50X + 3.50*Y + 2*(400-X) + 2.50*(350-Y) = 0.5*X + Y + const.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The constant term in expresssion (5) does not matter for the solution, so we can neglect it\r\n" );
document.write( "                                                                       (taking it equal to zero for the simplicity).\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The feasible domain is shown in the figure below.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "    \r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "    Plot x = 400 (red), y = 350 (green), X + Y = 700 (blue), X + Y = 250 (purple)\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "In the plot, you see a rectangle in QI formed by the red and the green lines\r\n" );
document.write( "\r\n" );
document.write( "and cut by two sloped lines, blue and purple.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The feasibility domain is the part of this rectangle concluded between the sloped lines.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "      On the plot, you see also the fifth color line sloped.\r\n" );
document.write( "\r\n" );
document.write( "      It is the track of the objective function on the coordinate plane.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "We should move this line parallel to itself until it will take its LOWEST possible position, still touching the feasibility domain.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Obviously, it will happen at the point (X,Y) with \r\n" );
document.write( "\r\n" );
document.write( "    Y = 0,   which due to constraint  X + Y >= 250  gives for X the value of  X = 250.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Thus the optimal solution is to ship\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "    250           pounds of coffee from Seattle to Salt Lake City,\r\n" );
document.write( "\r\n" );
document.write( "      0           pounds of coffee from Seattle to Reno,\r\n" );
document.write( "\r\n" );
document.write( "    400-250 = 150 pounds of coffee from San Jose to Salt Lake City,\r\n" );
document.write( "\r\n" );
document.write( "    350-  0 = 350 pounds of coffee from San Jose to Reno.\r\n" );
document.write( "
\r
\n" ); document.write( "\n" ); document.write( "Solved.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );