2.4.2 Ordering

We saw that in various context an index set has a natural order. If the set is a sequence of time periods or time points, for instance, then we order the elements within this set according to its natural sequence and we expect that the index mechanism is applied in this order. We take an example: Suppose P is a set of time periods or time points. Furthermore, xp is the production level in period p P, dp is the demand in period p, and sp is the stock level at the end of period p. Then we can build a balance equation at each period:

  production level during p minus demand  during  p

=  stock at the end of p minus stock at the beginning of p

Formally this can be written as follows (strictly speaking p has two different meaning here: once for a duration and once for a time point (sp), be careful to model this correctly):

xp - dp = sp - sp-1  with    p ∈ P

In this example we make a reference to sp-1, that is, to the time period before p. This would have no meaning, if the set P were not ordered. However, if we make reference to a different element then we must be careful to check of whether the element exists. In the expression above there is an undefined reference: if p = 1 then the expression sp-1 = s0 is not defined. Hence strictly speaking, the expression above is only valid for p P -{1}, we must exclude the first period and the balance equation of the first period is treated apart, or we must define s0 separately.