• No results found

Parametric, piecewise linear programming

unchanged components

4 ENSEMBLE UPDATING OF BINARY STATE VECTORS

4.3 Parametric, piecewise linear programming

In this section, we look further into the backward recursion of the DP algorithm described in Section 4.2. As we shall see, each step of the recursion involves the setup of an optimization problem that we refer to as a parametric, piecewise linear program, namely, an optimization problem with a piecewise linear objective function subject to a set of linear constraints, which we solve as a function of the parametertk. For simplicity of writing, we now introduce the following notations:

qijk=q(xk=0xk 1=i,xk=j,y), (24a)

qi1=q(x1=0x1=i,y), (24b)

fkij=f(xk 1=i,xk=j y), (24c)

ij

k(tk) = tk(xk 1=i,xk=j y), (24d) qkij(tk) =qtk(xk=0xk 1=i,xk=j,y), (24e)

i jk 1=f(xk=i xk 1=j), (24f) fori,j {0,1}andk 2.

Reconsider the initial step of the backward recursion. The goal of this step is to computeEn(tn) in (20) andqn(tn)in (21). The objective function at this step, En(tn,qn), can be computed as

En(tn,qn) = n00(tn)q00n + 01n(tn)(1 q01n) + n10(tn)q10n + n11(tn)(1 q11n). (25) Since 01n(tn) + n11(tn) =f(xn=1), we can, after rearranging the terms, rewrite (25) as

En(tn,qn) = n00(tn)q00n 01

n(tn)q01n + n10(tn)q10n 11

n (tn)q11n +f(xn=1). (26) As a function of the parametertn [tminn ,tnmax], we are interested in computing the solution ofqnwhich maximizes (26). In this regard one needs to take the constraint in (9) into account.

Specifically, the constraint entails at this step that

(xn 1,xn y) =f(xn 1,xn y)

for allxn 1,xn {0,1}. Hence, using that (xn 1,xn,xny) = (xn 1,xny)q(xn xn 1,xn,y), and that (xn 1,xny)follows by summing outxnfrom (xn 1,xn,xn y), we see thatqnmust fulfill

f(xn 1,xny) =

xn (xn 1,xny)q(xnxn 1,xn,y).

This requirement leads to four linear equations of which two are linearly independent, one where we setxn 1=0 and one where we setxn 1=1. Using the notations in (24a)–(24d), the two linearly

independent equations can be written as

fn00= 00n(tn)q00n + n01(tn)q01n, (27a) fn10= 10n(tn)q10n + n11(tn)q11n. (27b) Additionally, we know thatq00n,q01n,q10n,andq11n can only take values within the interval [0,1],

0 qijn 1, for all i,j {0,1}. (28)

To summarize, we want, as a function of the parametertn [tminn ,tnmax], to compute the solu-tions ofq00n,q01n,q10n, andq11n which maximize the function (26) subject to the constraints in (27) and (28). For any fixedtn, this is a maximization problem where both the objective function and all the constraints are linear inq00n,q01n,q10n, andq11n. As such, the maximization problem can, for a given value oftn, be formulated as a linear program and solved accordingly. In Appendix A, we show that the optimal solutionsqn00(tn),qn01(tn),qn10(tn), andqn11(tn)are piecewise-defined functions oftn and easy to compute analytically. Furthermore, we show that the correspond-ing functionEn(tn), obtained by insertingqn00(tn), qn01(tn),qn10(tn), andqn11(tn)into (26), is a continuous piecewise linear (CPL) function oftn.

Next, consider the intermediate steps of the backward recursion, that is,k=n 1,n 2,…,2.

At each such step, the aim is to computeEk n(tk)in (22) andqk(tk)in (23). The objective function at each step reads

Ek n(tk,qk) =Ek(tk,qk) +E(k+1)n(tk+1(tk,qk)), (29) and this function is to be maximized with respect toqk. The first term,Ek(tk,qk), in (29) can be computed as

Ek(tk,qk) = 00k(tk)q00k 01k(tk)q01k + k10(tk)q10k k11(tk)q11k +f(xk=1). (30) The second term,E(k+1)n(tk+1(tk,qk)), is a CPL function oftk+1. Fork=n 1, this result is immediate, since we know from the first iteration thatEn(tn)is CPL. Fork<n 1, the result is explained in Appendix A. Sincetk+1(tk,qk) is linear inqk, it follows thatEk+1(tk+1(tk,qk))is CPL inqkfor any giventk [tmink ,tkmax]. Hence, the objective function in (29) is also CPL inqkfor anytk [tmink ,tmaxk ]. As in the first backward step, we have the following equality and inequality constraints forqk:

fk00= k00(tk)q00k + k01(tk)q01k, (31a) fk10= 10k (tk)q10k + k11(tk)q11k (31b) and

0 q00k,q01k,q10k,q11k 1. (32) Additionally, we now need to incorporate constraints ensuring thatqkandtkreturn a value tk+1within the interval[tmink+1,tmaxk+1], wheretmink+1 andtk+1max are given by (15) and (16), respectively.

That is, we require

tmink+1 tk+1(tk,qk) tmaxk+1, (33) wheretk+1(tk,qk) follows from (17) as

tk+1(tk,qk) = k00(tk)q00k 0 0k + k01(tk)q01k 0 1k + k10(tk)q10k 0 0k + k11(tk)q11k 0 1k . (34) Clearly, for any fixedtk [tmink ,tmaxk ], all the constraints (31)-(33) are linear inqk. However, the objective function in (29) is only piecewise linear. As such, we are not faced with a standard linear program, but a piecewise linear program. Piecewise linear programs are a well-studied field of linear optimization and several techniques for solving such problems have been proposed and studied, see for instance Fourer (1985, 1988, 1992). The most straightforward approach is to solve the standard linear program corresponding to each line segment of the objective function separately, and afterward compare the solutions and store the overall optimum. This technique can be inefficient and is not recommended if the number of pieces of the objective function is relatively large. However, in our case, the objective functions normally consist of only a few pieces.

For example, in the simulation experiment of Section 5.2, where a modelq(x x,y)is constructed as much as 1,000 times, the largest number of intervals observed is 10 and the average number of intervals is 4.35. We therefore consider the straightforward approach as a convenient method for solving the piecewise linear programs in our case, but we note that more elegant strategies exist and may have their advantages. Further details of our solution are presented below.

First, some new notations needs to be introduced. For each 2 k n, we letMkdenote the number of pieces, or intervals, ofEk n(tk), and we let tB(j)k , j=1,…,Mk+1, denote the cor-responding breakpoints. Note that for the first and last breakpoints, we havetB(1)k =tkmin and tB(Mk k+1)=tkmax. Furthermore, we letIk(j)= [tB(j)k ,tB(j+1)k ] [tmink ,tmaxk ]denote interval numberj, and

k= {1,2,…,Mk} the set of interval indices. For eachj k, Ek n(tk)is defined by a linear function, which we denote byEk(j)(tk), whose intercept and slope we denote bya(j)k andb(j)k, respectively.

Each linear piece,Ek+1(j)(tk+1), of the piecewise linear functionE(k+1)n(tk+1)leads to a stan-dard parametric linear program. Specifically, if E(k+1)n(tk+1(tk,qk)) in (29) is replaced with E(k+1)(j) n(tk+1(tk,qk)), we obtain an objective function

Ek n(j) (tk,qk) =Ek(tk,qk) +E(k+1)(j) n(tk+1(tk,qk)), (35) which is linear, not piecewise linear, as a function ofqk. The corresponding constraints forqk

are given in (31) and (32), but instead of (33), we require thattkandqkreturn a valuetk+1(tk,qk) within the intervalIk+1(j) ,

tB(j)k+1 tk+1(tk,qk) tk+1B(j+1). (36)

Using (30), (34), and thatEk+1(j)(tk+1) =a(j)k+1+b(j)k+1tk+1, we can for eachj k+1rewrite (35) as Ek n(j) (tk,qk) = k00(j)(tk)q00k + 01(j)k (tk)q01n 1+ k10(j)(tk)q10k + 11(j)k (tk)q11k + k(j), (37)

where

00(j)

k (tk) = (b(j)k+1 0 0k +1) k00(tk),

01(j)

k (tk) = (b(j)k+1 0 1k 1) k01(tk),

10(j)

k (tk) = (b(j)k+1 0 0k +1) k10(tk),

11(j)

k (tk) = (b(j)k+1 0 1k 1) k11(tk), and

(j)

k =a(j)k+1+f(xk=1).

To summarize, we obtain for eachj k+1a standard parametric linear program, with the objec-tive function given in (37) and the constraints given in (31), (32), and (36). Solving the parametric linear program corresponding to eachj k+1, yields the following quantities:

E(j)k n(tk) =maxq

k E(j)k n(tk,qk), (38)

q(j)k(tk) =argmax

qk E(j)k n(tk,qk). (39)

The overall maximum value Ek n(tk)and corresponding optimal solution qk(tk)are then available as

Ek n(tk) =Ejk nk+1(tk)(tk) and

qk(tk) =q(jkk+1(tk))(tk) where

jk+1(tk) =argmax

j k+1 E(j)k n(tk).

As previously mentioned, and as shown in Appendix A,Ek n(tk)is a CPL function oftk. As such, Ek n(tk)is fully specified by its breakpoints and the function values at those points. The break-points ofEk n(tk)can be computed prior to the maximization. Thereby, we can obtainEk n(tk) for all values oftkquite efficiently since we only need to solve the parametric, piecewise linear program at the breakpoints ofEk n(tk).

Finally, consider the last step of the backward recursion,k=1. Here, the goal is to compute qt1(x1x1,y)andE1n(t1). Essentially, this step proceeds in the same fashion as the intermediate steps, but some technicalities are a bit different since there are only two variables involved inq1, namely,q01=q(x1=0x1=0,y)andq11=q(x1=0x1=1,y). Also,t1is not a parameter free to vary within a certain range, but a fixed number, namelyt1=f(x1=0), meaning that we obtain spe-cific values forqt1(x1x1,y)andE1n(t1). The function we want to maximize at this final backward

step, with respect toq1, is

E1n(t1,q1) =E1(t1,q1) +E2n(t2(t1,q1)), (40) where now, recalling that (x1y) =f(x1), the first term,E1(t1,q1), can be written as

E1(t1,q1) =t1q01+ (1 t1)(1 q11). (41) Again, as in the intermediate steps, we have a piecewise linear, not a linear, objective function.

To determine the constraints forq1, we note that the requirement (9) forq(x x,y)entails that f(x1y) = (x1y).

Thereby, since t1=f(x1=0) and using that f(x1y) = x1 (x1,x1y) and (x1,x1y) = f(x1)q(x1x1,y), we see that the following requirement must be met byq(x1x1,y):

f(x1y) =t1q(x1x1=0,y) + (1 t1)q(x1x1=1,y). (42) Additionally, we have the inequality constraints

0 q01, q11 1. (43)

So, we are faced with a piecewise linear program, with the piecewise linear objective function (40) and the linear constraints (42) and (43). Again, we proceed by iterating through each linear piece ofE2n(t2(t1,q1)), solving the standard linear program corresponding to each piece sepa-rately. That is, for eachj 2, we replaceE2n(t2(t1,q1))in (40) byE2(j)n(t2(t1,q1))and consider instead the objective function

E1(j)n(t1,q1) =E1(t1,q1) +E2(j)n(t2(t1,q1)), (44) which is linear, not piecewise linear, as a function ofq1. As we did for each subproblemj k+1

in every intermediate backward iteration, we must for each subproblemj 2incorporate the inequality constraints

tB(j)2 t2(t1,q1) tB(j+1)2 , (45)

where nowt2(t1,q1) follows from (18) and (19) as

t2(t1,q1) =t1q01 0 01 + (1 t1)q11 0 11 . (46) Using (41), (46), and thatE2(j)n(t2) =a(j)2 +b(j)2t2, we can rewrite the function in (44) as

E(j)1n(t1,q1) = 10(j)(t1)q01+ 11(j)(t1)q11+ 1(j)(t1), (47) where

10(j)(t1) =t1(1+b(j)2 0 01 ),

11(j)(t1) = (1 t1)(1+b(j)2 0 11 ),

(j)1(t1) =1 t1+a(j)2.

To summarize, we obtain for eachj 2a standard linear program, where the aim is to maximize the objective function (47) with respect toq1subject to the constraints (42), (43), and (45). This program is solved fort1=f(x1=0). Analogously to (38) and (39), let

E(j)1n(t1) =maxq

1 E(j)1n(t1,q1), q(j)1(t1) =argmax

q1 E(j)1n(t1,q1).

Ultimately, we obtain

E1n(t1) =E(j12)n(t1) and

q1(t1) =q(j12)(t1) where

j2=argmax

j 2 [E(j)1n(t1)].