The left-hand side of constraint 1 is Xl + X,m where In is the total number of periods in a 24-hour day (= 6 in the present example). For the remaining constraints, the
left-hand side takes the form Xi-l + Xi> i = 2,3, ... , m. Using if then else (as we
did in the arbitrage problem), all In constraints can be represented compactly by one
statement as shown in Figure 2.18 (file amplEx2.3-8.txt). This representation is superior to defining the left-hand side of the constraints as an explicit parameter