\documentclass[12pt]{article}
\usepackage{fullpage,amsmath,amsfonts,graphicx}

\newcommand{\x}{\boldsymbol{x}}
\newcommand{\y}{\boldsymbol{y}}
\renewcommand{\a}{\boldsymbol{a}}
\renewcommand{\b}{\boldsymbol{b}}
\renewcommand{\c}{\boldsymbol{c}}

\begin{document}

\title{Operations Research}
\author{Homework 5}
\date{Due in class Tuesday, October 17, 2017}
\maketitle

\begin{enumerate}

\item \emph{(This is a variation of Exercise 8.1-2 from HL.)} The
Childfair Company has three plants producing child push chairs that
are to be shipped to four distribution centers.  Plants 1, 2, and 3
produce 12, 17, and 11 shipments per month, respectively.  Each
distribution center needs to receive 10 shipments per month.  The
distance from each plant to the respective distribution centers is
given below:

\begin{center}
\begin{tabular}{lcccc}
\hline
& \multicolumn{4}{c}{\textbf{Distribution Center}$\vphantom{1^{1^1}}$} \\
& \textbf{1}$\vphantom{1^{1^1}}$ & \textbf{2} &
  \textbf{3} & \textbf{4} \\
\hline
\textbf{Plant 1}$^{\vphantom{\tfrac11}}$ & 800 miles & 1\,300 miles&
  400 miles & 700 miles \\
\textbf{Plant 2} & 1\,100 miles & 1\,400 miles & 600 miles & 1\,000
                                                            miles \\
\textbf{Plant 3} & 600 miles & 1\,200 miles & 800 miles & 900 miles \\
\hline
\end{tabular}
\end{center}
The freight cost for each shipment is \$100 plus 50 cents per mile.
The objective is minimizing the total cost of transportation.

\begin{enumerate}
\item Formulate and solve the problem in Pyomo.

\item Now suppose that demand in the area served by Center~1 goes up
to 15 shipments per month.  Production cannot be increased on short
notice, so some or all of the distribution centers will be
under-supplied.  Modify your Pyomo code to determine the total number
of shipments to arrive at each of the centers if the objective is
still to minimize the overall cost of transportation.
\end{enumerate}
Submit a printout of your Ipython notebook showing code and output for
each.

\item \emph{(HL, Exercise 8.1-4.)} The Versatech Corporation has
decided to produce three new products. Five branch plants now have
excess product capacity. The unit manufacturing cost of the first
product would be \$31, \$29, \$32, \$28, and \$29 in Plants 1, 2, 3,
4, and 5, respectively. The unit manufacturing cost of the second
product would be \$45, \$41, \$46, \$42, and \$43 in Plants 1, 2, 3,
4, and 5, respectively. The unit manufacturing cost of the third
product would be \$38, \$35, and \$40 in Plants 1, 2, and 3,
respectively, whereas Plants 4 and 5 do not have the capability for
producing this product. Sales forecasts indicate that 600, 1\,000, and
800 units of products 1, 2, and 3, respectively, should be produced
per day. Plants 1, 2, 3, 4, and 5 have the capacity to produce 400,
600, 400, 600, and 1\,000 units daily, respectively, regardless of
the product or combination of products involved. Assume that any
plant having the capability and capacity to produce them can produce
any combination of the products in any quantity.  Management wishes to
know how to allocate the new products to the plants to minimize
total manufacturing cost.  
\begin{enumerate}
\item Formulate this problem as a
transportation problem.
\item Use Pyomo to obtain an optimal solution.
\end{enumerate}
Part (a) should be submitted handwritten on paper or typed into the
Ipython notebook using mathematical markup; for part (b) submit a
printout of your Ipython notebook showing code and output.
\end{enumerate}


\end{document}
