\documentclass[11pt]{article}
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % ... or a4paper or a5paper or ...
%\geometry{landscape} % Activate for for rotated page geometry
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{fullpage}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\usepackage[parfill]{parskip}
\title{AM121/ES121 Mathematical Programming Style Guide}
\author{}
\date{}
\begin{document}
\maketitle
\vspace{-3em}
This is a class in which clear and precise expression is
essential. When formulating mathematical programs, you must say what
you mean and make sure that others can understand what it is that you
mean. We believe the act of making things clear for others is often an
important step to understanding for yourself what it is that you mean
(and what it is that you don't mean). Here we have provided a few
general guidelines and advice, followed by an example solution to give
you a concrete sense of exactly what we are looking for. The solutions
to exercises in the section notes from week 1 will give you further
examples.
Note that further example formulations and \LaTeX\,code templates for mathematical programs is available in the ``Useful code snippets'' file on the Resources tab. This code for formatting a linear program may be copied and inserted into your assignment write-up, and modified to reflect the model you have designed.
General guidelines and advice:
\begin{itemize}
\item \textbf{Declare}. Define sets, parameters, and variables.
\item \textbf{In English}. Each line of math should be
accompanied by an English description that helps the reader make
sense of that part of the model. For sets, parameters, and
variables, what do the mathematical symbols represent? For the
objective function, what are you maximizing or minimizing? For each
constraint or set of constraints, what limitation is the constraint
imposing on the solution space?
\item \textbf{Label Components}. Make explicit the parts of the model.
Which lines refer to sets? Which lines refer to parameters?
Variables? Be sure to start the objective function line with the
word maximize or minimize. Use the words `subject to' (or `s.t.') to demarcate
defining constraints.
\item \textbf{In order}. Write down set definitions, followed
by parameters, then variables. Below that, write the objective
function, followed by the constraints.
\item \textbf{Explain when necessary}. If a part of your model is
somewhat complicated, you should explain the process by which you
arrive at the equations for that part of your model. For example, we
took a number of steps to arrive at the objective function in the
football example in the first section, and noted the steps in the
solution.
\item \textbf{The solution is secondary}. For most problems on the
homeworks, you will be expected to come up with a generalized
mathematical model that works for any valid values of the
parameters. We will sometimes ask you to find the solution for a
particular instance of the problem, but this is in addition to
formulating the model and not in place of it. When in doubt, contact
the course staff.
\item \textbf{Descriptive symbols}. When defining sets, parameters,
and variables, use descriptive symbols. For example, if defining a
\textbf{c}ost parameter over a set of \textbf{p}roducts, try using
$c_p$.
\end{itemize}
\subsection*{Example: The Diet Problem}
\fbox{
\parbox{5.5in}{
[Question] Consider the problem of finding the cheapest combination of foods that
will satisfy all the daily nutritional requirements of a person. You
are given the cost of food items, how much of each nutrient a unit of
that food contains (e.g., calories, fats, minerals, etc.), and the
upper and lower limits on how much of each nutrient a person needs.
Formulate a linear program for this problem.
}
}
\newline\newline
Here is a sample solution writeup:
\begin{eqnarray*}
\textrm{Sets} & F & \textrm{set of food items} \\
& N & \textrm{set of nutrients} \\
\textrm{Parameters} & c_i, i\in F & \textrm{cost of food $i$} \\
& n_{ji}, j \in N, i \in F & \textrm{amount of nutrient $j$ in food $i$} \\
& n^L_j, j\in N &\textrm{minimum amount of nutrient $j$ required} \\
& n^U_j, j\in N &\textrm{maximum amount of nutrient $j$ allowed} \\
\textrm{Variables} & X_i, i\in F & \textrm{amount of food $i$ to consume}
\end{eqnarray*}
\begin{eqnarray*}
\textrm{Minimize:}\\
& \displaystyle \sum_{i\in F} c_i X_i & \textrm{minimize total cost of food}\\
\textrm{Subject to:}\\
& n^L_j \leq \sum_{i \in F} n_{ji} X_{i} \leq n^U_j \quad \forall j \in N & \textrm{consumption of nutrients in allowable range}
\end{eqnarray*}
This sample solution is concise; it gives the linear program
formulation with text describing each element of the model but nothing
more. For writing down formulations in your homework, this is all that
is required (unless there is a part of the formulation that is
complicated, in which case you should clarify further with
explanations beyond the formulation itself). If you prefer, you can
declare sets, parameters, and variables in English sentences instead
of listing them as we did here (e.g., `Let $F$ represent the set of
food items'). You can also discuss and develop each piece of your
model in prose, but do make sure that you end up writing down the
complete mathematical program as well. Whatever you end up doing, your
model should be fully specified and described in a manner that makes
it easy for someone else to read and understand.
\end{document}