• No se han encontrado resultados

Si no hay adopción, nosotros como Protectora de Animales que somos, no sacrificamos a los

In document El Mundo de los galgos (página 52-58)

Los galgos son perros inteligentes y se pueden educar motivándolos con premios Es importante enseñarles su nombre y que acudan a la llamada En general, no es una

L: Si no hay adopción, nosotros como Protectora de Animales que somos, no sacrificamos a los

The piecewise linear approximation method described in §5.1.1 may be applied to the (nonlin- ear) expected energy production function of each PGU in the objective function (4.12) of the nonlinear GMS model over the scheduling window [1, T ]. This scheduling window contains T − 1 distinct possible starting times 1, . . . , T − 1 at which the internal breakpoints b1, . . . , bn−1 in

(5.11) may be positioned. It may, of course, be assumed without loss of generality that bn= T .

Two questions arise naturally at this point: (1) What should the value of n be in order to achieve a close approximation of a PGU expected energy production function? (2) Given that a suitable value if n has been decided upon, what are the optimal positions for the internal breakpoints b1, . . . , bn−1? The answer to the former question depends on the desired degree of closeness

of the piecewise linear approximation of the expected energy production function. Once the first question has, however, been answered, the second question is an optimisation problem that can be solved by means of dynamic programming (see §2.3.1). This section is devoted to a description of how this optimisation process may be carried out.

The desirability of the locations of a given set of internal breakpoints b1, . . . , bn−1 may be

quantified by assessing the piecewise linear approximation of the expected energy production function of a PGU with respect to a regression model of the form (5.1). The positioning of these breakpoints may therefore be maximised by minimising the sum of squared residuals (SSR), described in§3.7.2, of the aforementioned linear regression model for each of the resulting n line

segments [15]. An algorithm for this purpose was developed by Bai and Perron [14, 15]. This regression problem was previously considered by Bellman and Roth [24] as well as by Guthery [102]. Their work was, however, extended in 1997 by Bai and Perron [15] to accommodate multiple regression models and partial structural changes to the original model.

The method is initialised by constructing a T × T upper-triangular matrix of SSR of all the possible line segments in a piecewise linear approximation of a PGU expected energy production function. The rows of the matrix represent the possible starting dates corresponding to the line segment, while its columns represent the possible ending dates corresponding to the line segment. The entry in row i and column j of this matrix, denoted by SSR(i, j), represents the SSR of an approximate line segment starting at time period i and ending at time period j. The structure of such a triangular matrix is shown in Table 5.1.

Table 5.1: The triangular matrix containing the SSR for line segments starting at date i and ending at date j. Terminal date 1 2 3 · · · T Starting date 1 SSR(1, 1) SSR(1, 2) SSR(1, 3) · · · SSR(1, T ) 2 SSR(2, 2) SSR(2, 3) · · · SSR(2, T ) 3 SSR(3, 3) · · · SSR(3, T ) .. . . .. ... T SSR(T, T )

The upper-triangular matrix in Table 5.1 is constructed by means of a standard updating formula which calculates the recursive residuals1 on a segment-by-segment basis. Let v(i, j) be the

recursive residual at time j using a sample of the observations starting at time i. Then the recursive relationship

SSR(i, j) = SSR(i, j − 1) + v(i, j)2

holds [33], which may be used to populate the matrix. Once the matrix has been constructed with the relevant SSR contribution calculated for each line segment, a dynamic programming algorithm is employed to evaluate which combination of line segments achieves a global minimum of SSR.

Suppose the minimum length of an approximating line segment is h and let SSR({Pr,k}) be the

SSR associated with an optimal piecewise linear approximation containing r internal breakpoints by sampling the first k observations2 in the data set. Then the global SSR for any number of line segments is a linear combination of the entries in the upper-triangular matrix of Table 5.1 [14]. An optimal partition is therefore a solution to the recursive problem

SSR({Pn,T}) = min

nh≤j≤T −h[SSR({Pn−1,j}) + SSR(j, T )]. (5.21)

The procedure commences by evaluating all the sub-samples that allow one possible breakpoint ranging from observation h to T − nh in order to obtain a piecewise linear approximation with one internal breakpoint. During this step, the SSR of T − (n − 1)h + 1 optimal breakpoint partitions are calculated and stored. Each of these values has a corresponding ending date ranging from 2h and T − (n − 1)h (inclusive). The next step is to obtain an optimal partitioning with two breakpoints, each of which each has a corresponding ending date ranging between 3h

1

A recursive residual is the difference between a true value and an estimated value, but these residuals are only calculated for a certain number of observations in sequence [156].

and T − (n − 2)h (inclusive). This is achieved by considering all the possible one-breakpoint partitions in order to insert another breakpoint that will achieve a minimum SSR. In this way an optimal piecewise linear approximation containing two internal breakpoints is obtained. This forward recursive procedure is repeated until a set of T −(n+1)h+1 optimal internal breakpoints has been obtained, each of which has corresponding ending dates ranging from (n − 1)h and T − 2h (inclusive).

Although the algorithm executes very quickly, the majority of the computational time is at- tributed to the construction of the upper-triangular matrix of Table 5.1 [14]. This procedure is employed later in this dissertation to linearise the model (4.12). The procedure is implemented by invoking an R package called strucchange which contains a function called breakpoints. This function computes the optimal positions of the internal breakpoints b1, . . . , bn−1, given a

value of n, according to the method described in this section [223].

In document El Mundo de los galgos (página 52-58)

Documento similar