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

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

global um xm jm

nn=length(vv)-1;

nz=-1/hh;

if xi < 0, xi = 0; end

fr=-nz*mod(xi,hh); bb=ceil(xi*nz)+1;

if bb>1, vw=vv(bb-1,:);

else vw=vv(1);

ix=(1-fr)*vv(bb,:) + fr*vw;

Note that linear interpolation of the state is required in integrating the objective function, and in solving the adjoint differential equation. The latter is solved backwards in time t, so needs backwards interpolation.



This page intentionally left blank



Appendix E

Format of Problem Optimization

The control function approximates the control function w(.) by a step-function, dividing [0,1] into nn equal subintervals. (Because the dynamic equation has a smoothing effect, set function controls are usually a sufficient approximation.) Function values (and often also gradients with respect to control) for the objective function are obtained by solving differential equations. They are then supplied to the optimization program constr in MATLABs Optimization Toolbox. The computation is considerably faster if gradients are supplied, but this is not suitable for some problems, especially if the functions are not well behaved outside the feasible region of the problem. If gradients are used, then the adjoint differential equation is required. If a constraint x(l) = к is required, then it is added to s a positive penalty parameter. The user must supply a calling program (defining all parameters), and user subroutines for the functions of the given control problem. This use of MATLAB minimizes the amount of programming required for a given control problem, since MATLAB handles matrix calculations and passing of parameters very effectively. (But another programming language may be preferred for a large control problem, if faster computation is needed.) The acronym SCOM stands for step-function control optimization on Macintosh, since the intention was to compute optimal control on a desktop computer, rather than on a mainframe or workstation. Note that MATLAB on a Windows computer does the same job.



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