Промышленный лизинг Промышленный лизинг  Методички 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 [ 15 ] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67


Here, h = 1/nn, r = nn, nn = nb* ns.


Two vectors which represent two different levels of the subdivision of the time period [0,1] um and sm are defined for mapping the control and calculating the integral (see the next section).

The relationship between the real time which is used in the calculation of the integration and the scaled time ris shown as follows:

control only jumps at the end-points of the big subintervals. Thus the control has the same constant value in all the small subintervals which make up a big subinterval. Another real time pt which represents the real switching times for the control is defined as follows:

where, nb is the number of big subintervals. This pt is used in differential equation solving with respect to control u(t). Correspondingly the control and state with respect to r are defined:

The two first-order differential equations of the state functions of the financial system in (3.2) and (3.3) are transformed into two equivalent first-order equations:

x\(t) = х\{ф{т))(а1/<1т)ф(т) = T* x2(t) *nb* (ptj+i - ptj) (3.13)







x2(t) = Х2(ф(т))(с1/с1т)ф(т)

= T* (-xi(t) + Uj - T*x2(t)) *nb* (ptj+] - ptj)(ЗА4)

The objective function of the financial optimal control model is then transformed to a sum of integrals in successive subintervals:


where h = 1/nn, nn = nb*ns.

4. Computational Algorithm: The Steps

In this approach, time intervals of the financial model are defined at two levels, with the planning period [0, T] first divided into nb big intervals, represented by vector um (see also Chen and Craven [10, 2002]):

then each big subinterval is subdivided into ns small subintervals. Thus [0, T] is subdivided into nb * ns numbers of subintervals, represented by the vector sm:


At each end-point of the big subintervals, the control jumps.

Algorithm 3.1 Main Program for the oscillator problem (see project2 l.m in Appendix A.2)

Step 1. Initialization. Set a vector of parameters par = [the number of the state components, number of control components, nb = the number of big subintervals, ns = the number of small subintervals]; and get the total number of the subintervals by calculating nn = nb * ns. Set the MATLAB constr functions system parameters par(13) = 1 (here, 1 represents only one equation constraint in the minimization problem), par(14) = the maximum number of function evaluations; arbitrary starting lengths of the switching time intervals Set the vectors of upper




bounds uu and the vector of lower bounds ul of um, thus uu < um < ul. Also set the initial state xinit.

Step 2. Call the MATLAB constr function. In turn, constr calls the Minimization Program to calculate the minimization of the calling program with respect to the optimal vector um.

Step 3. Input the optimal result um into Minimization Program , to obtain the values of the objective function J(nn) (the last value of the integral) and state vector xm (xm is a vector of all the values of the state functions take at the grid-points of the switching time intervals).

Step 4. Attach a cost К to nn. Add К * nn to the objective function (3.2) and calculate F = Jnn + К *nn.

Step 5. Set a bigger nn and new starting time intervals, go back to Step 2; EXIT when the result of cost function J stops decreasing.

Algorithm 3.2: Minimization Program (see project2 2.m in Appendix A.2)

Step 1. Initialization. Input um, par and initial state xinit. Set the initial state xm(1, :) = xinit, and nx = par(1), the number of the state components, nu = par(2), the number of the control components, nb = par(3), the number of big time intervals, ns = par(4), the number of small time intervals, nn = par(3) * par(4), the number of total time intervals; initialize the scaled time t = 0, subinterval counter it = 1, hs = length of each equation subintervals. Choose the Input function for second order differential equation as the right side of the differential equation (3.1), input um (in this chapter, the second order equation in the optimal control problem is transformed into two equivalent first order differential equations; so there are two state functions).

Step 2. Construct the vector sm whose components represent the lengths of the all time intervals by dividing each big time interval um by ns.

Step 3. Call the SCOM package function nqq with the stated Input function for second order differential equation to solve the two equivalent first order differential equations (3.3), (3.4) for the state function x(t). Tabulate the solution for the state as the vector xm(:, 1) = [x\{l),x\(2),... ,xi{nn)}, xm(:, 2) = [ж2(1), х2(2),..., ж2(ш)], xm(:, 1) is the result of (3.3), x(: , 2) is the result of (3.4).

Step 4. Set the initial scaled time t = 0, subinterval counter it = 1, initial state zz(: 1) = 0, ma = 1, the number of the input state function. Choose the input function for the oscillator problem for SCOM function nqq



1 2 3 4 5 6 7 8 9 10 11 12 13 14 [ 15 ] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67