 # Warehouse problem

The manager of a warehouse buys and sells the stock of a certain commodity, seeking to maximize profit over a period of time, called the horizon. The warehouse has a fixed capacity, and there is a holding cost that increases with increasing levels of inventory held in the warehouse (this could vary period to period). The sales price and purchase cost of the commodity fluctuate. The warehouse is initially empty and is required to be empty at the end of the horizon. This is a variation of the production scheduling problem, except demand is not fixed. (Level of sales is a decision variable, which depends on whether cost is less than price.)

Let $LaTeX: x(t)$ be the level of production in period $LaTeX: t$ (before sales); $LaTeX: y(t)$ be the level of inventory at the end of period $LaTeX: t$; $LaTeX: z(t)$ be the level of sales in period $LaTeX: t$; $LaTeX: \mbox{W}$ be the warehouse capacity; $LaTeX: h_{t, u}$ be the holding cost of inventory $LaTeX: u$ from period $LaTeX: t$ to $LaTeX: t+1$; $LaTeX: p(t)$ be the production cost (per unit of production); $LaTeX: s(t)$ be the sales price (per unit); $LaTeX: \mbox{T}$ be the horizon.

Then, the mathematical program is $LaTeX: \begin{array}{rl} \min & \sum_{t} h(t, y(t)) + px - sz \\ \\ s.t. & x, y, z \ge 0, \\ & y(0) = y(T) = 0, \\ & y(t) = y(t-1) + x(t) - z(t) \le W \mbox{ for } t=1,...,T. \\ \end{array}$