Look at the first quarter: how are these variables restricted and related?
Clearly we need and
. Now, anything
that starts as inventory or is produced in the period must either be
used to meet demand or ends up as inventory at the end of period 1.
This means:
For period 2, in addition to the upper bounds, we get the constraint
For period 3, we get
and for period 4 (assuming no inventory at the end):
Our objective charges 2000 for each x, 2200 for each y, and 100 for each i: