# Warehouse problem

### From Glossary

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
- be the level of production in period (before sales);
- be the level of inventory at the end of period ;
- be the level of sales in period ;
- be the warehouse capacity;
- be the holding cost of inventory from period to ;
- be the production cost (per unit of production);
- be the sales price (per unit);
- be the horizon.

Then, the mathematical program is