+ All Categories
Home > Documents > Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems...

Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems...

Date post: 18-Jul-2018
Category:
Upload: buinhan
View: 218 times
Download: 0 times
Share this document with a friend
21
This PDF is a selection from an out-of-print volume from the National Bureau of Economic Research Volume Title: Annals of Economic and Social Measurement, Volume 3, number 1 Volume Author/Editor: Sanford V. Berg, editor Volume Publisher: NBER Volume URL: http://www.nber.org/books/aesm74-1 Publication Date: 1974 Chapter Title: Methods for Computing Optimal Control Solutions: On the Solution of Optimal Control Problems as Maximization Problems Chapter Author: Ray C. Fair Chapter URL: http://www.nber.org/chapters/c10000 Chapter pages in book: (p. 135 - 154)
Transcript
Page 1: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

This PDF is a selection from an out-of-print volume from the National Bureauof Economic Research

Volume Title: Annals of Economic and Social Measurement, Volume 3,number 1

Volume Author/Editor: Sanford V. Berg, editor

Volume Publisher: NBER

Volume URL: http://www.nber.org/books/aesm74-1

Publication Date: 1974

Chapter Title: Methods for Computing Optimal Control Solutions: On theSolution of Optimal Control Problems as Maximization Problems

Chapter Author: Ray C. Fair

Chapter URL: http://www.nber.org/chapters/c10000

Chapter pages in book: (p. 135 - 154)

Page 2: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

.4n,u,1 0/ Ecimontic and Social .tleosiireownt 3. I 1974

METHODS FOR COMPUTING OPTIMAL CONTROL SOLUTIONS

ON THE SOLUTION OF OPTIMAL CONTROL PROBLEMS AS

MAXIMIZATION PROBLEMS

BY RAY C. FAIR*

In this paper the problem of obtaining optimal controLs fin econometric models is rreaud io a simpleunconstrained nonlinear maxinhi:ation pi oblein. Iarious inaximizat ion algorithms are tested, and theresults indicate that quite large problems can be solied. i-or deterininistic problems a appears feasthle tocompute optimal controls for most econometric models encountered in practice. Stochastic prohlem.s canalso he solred by the approach of this paper by means of stochastic simulation.

I. INTRODUCTION

There appears to he among many economists the view that the computation ofoptimal controls for moderate- to large-scale nonlinear econometric models isnot feasible. Pindyck [19], for example, has questioned whether "nonlinearoptimization [is] worth all of the computational difficulty that it entails," l and

Shupp [24] has stated that "the size and complexity of these models precludeformal optimization." 2 The results presented in this paper indicate that this viewis not correct, even for models of up to 100 or 200 equations. The results suggestthat it is feasible to compute optimal controls for most econometric modelsencountered in practice.3

Historically, optimal control problems have been formulated in continuoustime and have been looked upon as problems in choosing fimctions of time tomaximize an objective function. Fairly advanced mathematical techniques arcrequired to solve these problems. For discrete-time models, however, whichinclude virtually all large-scale econometric models, optimal control problemscan also be looked upon as problems in choosing t-ariahles to maximize anobjective function. The number 0 variables to be determined is equal to thenumber of control variables times the number of time periods chosen for theproblem. From this perspective, optimal control problems are straightforwardmaximization problems. and in attempting to solve problems in this way. onecan take advantage of the recent advances that have been made in computationalalgorithms for maximizing nonlinear functions of variables. This approach. oftreating optimal control problems as problems of maximizing a nonlinear functionof variables, is the approach taken in this paper.

Department of Economics. Princeton University. I would like to thank Gregory C. Chow.Kenneth D Garbade, Stephen M. Goldfeld, and Richard E. Quandt for many helpful comments.

Pindyck [19], P. 388.2 Shupp [24], p. 94.

See also Holbrook [13] for a method of controlling a nonlinear system with a quadratic objectisefunction.

135

Page 3: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

2. i'iir (iiNl:R..\I Nit 11101 ii Soi.i'r's,Assume that the model under consiikiation is deteruiinjstj' and has 'equations. Write each equation for each period of time as

(I) /,(j',.:,...v,, ,) = ()(=1, 1:

where r, is a vector of observations for period t on the g endogeiiotjs variables inthe model, :, is a vector of observations for penod t on the noncontrol, pre-determined variables in the model, .'s, is a vector of observati(-ins for perk t Oflthe control variables in the model, and z, is a vector of nonzero parameters thatarc included in equation i for period t. The t subscripts in and I, allow for thepossihilit that some parameters and some functional forms are changing overtinie.5 Lagged endogenous variables are included in the :, vector. T is the totalnumber of periods to be considered in the cont ml problem.The model in this assumed to he such that, for each t, given values for.,, and , (1 = I g), one can solve numerically for r,. In practice, most large-scale econometric models arc solved each period by sonic version of the Seidelmethod. Further, one can frequently isolate each component of the , vector onone side of one equation, which greatly aids m the solution of the model, lithemodel issolved for more than one period, then the solution values of theendogenotis

variables for previous periods are used, 'hen appropriate, as values for the laggedendogenous variables in the :, vector. For linear models, of course, values of t',are merely obtained from reduced form equations.For a time horizon of T periods, the objective function, Ii. is taken to he afunction of t',,:,, and .v, (1 = I, T)

(2) W = l,ft1 ,..., : ,..,, :j; .vwhere W, a scalar, is the value of the objective function corresponding to valuesof v,. ;, and x, (t = I 7).

The optimal control problem for this discrete-time, deterministic model isto choose values of .x ,...,1 so as to maximize U' subject to the equation.constraints in (1). The givens of the problem are the value of each ,, the valuesfor each period of the purely exogenous variables, and initial values for the laggedendogenous variables. Assume that .v. is of dinieiision k. so that there are kTcontrol values to determine. Let x he a kicomponent vector denoting thesevalues: - = (x ,...,x ). Now, for each valtie of x, one can compute a value ofU' by first solving the model in (I for 1 and then using these values alongwith the values for : : and x to compifie U in (2). The optimal controlproblem can thus he looked upon as a problem in choosing variables (the elementsof .v) to maximize an un('ofl,s(r(Jj,U'(/ nonlinear function By substitution, the con-strained maximization problem is transforned into the problem of maximizingStochastic models are discussed in Section 7It is assumed throuhut this paper that the ialucs of, and the values ofthec\ogcnous Var!ahJin the :, vector are known with certaintySee. ror example, Fromn) and Ktein [iOJ. pp 373 382.

l36

Page 4: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

S

an unconstrained function of the control variables:

11' = (tV).

where stands for the mapping .v - .v, r1 ,...t' , = ,.... IF. In general itwill not he possible to express v explicitly in terms of :1.x. and , so that ingeneral it will not he possible to write W in (2) explicitly as a function of x,.

and ,(t = I,.., T). Nevertheless, given values for and (1 = I .....Th

values of Wean be obtained numerically for dil1rent values of -cThere are many algorithms available for maxirriizing (or minimizing) non-

linear functions of variables. Since It' cannot in general be written as an explicitfunction of x, it will in general be difficult to obtain analytically the partial deriva-tives of/i with respect to the elements ofx. Therefore, in attempting to solve optimalcontrol problems by treating them as problems in maximizing a nonlinear functionof variables one will usually be required either to use algorithms that do notrequire derivatives or else to compute derivatives numerically. Both approacheshave been followed for the results in Sections 4 and 5.

Algorithms that do not require derivatives arid algorithms for which deriva-tives are obtained numerically spend most of their time doing function evaluations.For the results in Sections 4 and 5, over 75 percent of the time was spent doingfunction evaluations for all algorithms tried except in two cases, where the figureswere 52 and 53 percent. One function evaluation in the present context corresponds

to the solution of a g-equation model for T periods (plus the rather trivial coin-

putation,oncey1 are determined, of Win(2)). It isthereforequite importantto sohe a model in the most efficient way possible, since for one solution of theoptimal control problem a model will usually be solved hundreds or thousandsof times. Some suggestions are presented in Section 6 for efficient ways of solving

models.Much of the engineering literature on optimal control is concerned with

continuous-time models and so is not of direct concern here. Polak [20]. however.does present a good discussion of the discrete optimal control problem in engin-

eering.7 The discrete-time model considered by Polak differs from the standardeconometric model considered in this paper in that his model is already in reducedform. In the notation of this paper, each component of ", would be written as anexplicit function of ;, x, and , for Polak's model. The fact that the derivativesof v, with respect to z and x1 can be directly obtained for Polak's model allows

Polak to obtain fairly easily the derivatives of the objective function with respecto the values of the control variables. Polak also reports that the time horizon

for the problems he is considering may be as large as 1,000 periods,8 which is

much larger than the time horizon for most problems in economics, where the

horizon is likely to be much less than even 100 periods. The discrete optimal

control problem in economics is thus on the one hand easier than the corresponding

problem in engineering in that the time horizon appears to be much smaller

and on the other hand more difficult in that analytic derivatives of the objective

See especially pp. 66-71. See also Athans [I] for a discussion of the linear-quadratic-Gaussianstochastic control problem for discrete-time models.

Polak [201, P. 67. Polak does not, however, report on any actual solutions of problems of this

sort in his book.

137

Page 5: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

I

I

function with respect to the values of the control variables are not easy to obtainbecause of the non-reduced..form nature of most cconometrk: models.

3. Tnt: COMPUTATIONAl Al.c;oRTinIs UsiaThree basic algorithms were used for the results in Sections 4 and 5. The first

is the 1964 algorithm of Powell [21], which does not require any derivatives. Thesecond is a gradient algorithm, which requires first derivatives. The third is thequadratic hill-climbing algorithm of Goldfeld, Quandt, and Trotter [12], whichrequires both first and second derivatives. The gradient algorithm that was usedin this study is a member of the class of algorithms considered by Huang [15].The algorithms within this class basically differ from each other in how theapproximation to the inverse of the matrix ofsecond partial derivatives is updatedafter each iteration. One member of this class is the well-known DFP variablemetric algorithm.'0 Some results using the DFP algorithm are reported below,but the main gradient algorithm that was used in this study is the one that updatesby means of the "rank one correction formula." H This algorithm appears togive the best results. Some results using one other member of the class ofalgorit},sconsidered by Huangarealso reported below.t 2 All three ofthegradient algorithmsconsidered in this study use linear searches on each iteration.

All of the computer programs were compiled in FORTRAN-H and wererun on an IBM 360-91 computer at Princeton University.'3 All derivatives forthe gradient and quadratic hill-climbing algorithms were computed numerically.For the gradient algorithms the derivatives were computed in two ways. For oneset of runs derivatives were obtained for each iteration by computing two functionevaluations per variable, each variable being perturbed by equal amounts aroundthe value available from the previous iteration. For the otherset of runs derivativeswere obtained for each iteration by computing only one function evaluation pervariable. The percentage amount by which variables were perturbed (0.01 percent)was not varied from iteration to iteration. Stewart [25] has proposed a moresophisticated way of computing numeric derivatives when using gradientalgorithms, but his method was not tried in this study. For the quadratic hill-climbing algorithm first derivatives were always obtained by computing twofunction evaluations per variable, as these computations had to be made anywayto obtain the own second derivatives, but the cross partial derivatives were com-puted in two ways. For one set of runs the cross partial derivatives were obtainedby computing four extra function evaluations per set of two variables, and for theother set of runs the derivatives were obtained by computing only one extra

See Powell [23] for an excellent summary of Huangs theory.0 See Davidori [7] and Fletcher and Powell [9].'' See Powell [23], p. 41.12 See Powell [23], equations (3i) and (32), p. 4i, for a presentation of this algorithm.13 The Powell and quadratichlllcljmbjng algorithms were programnied by Stephen M. Goldfcldand Richard .E. Quandt. The three gradient algorithms were programmed by Thomas Russell.'4Letf(a h? be a function of two vartables Then the formulas that were used to obtain the Partialderivatise off with respect to a for the two runs are (fa + r.,b) - - rh))2 and (fh + rh)f(a, ho/C where = O.000lu or 0.00000! whichever is larger. For all of the runs the problems wereset up so that the solution values of the variables would be between about 0.1 and 10.0138

11

Page 6: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

function evaluation per set of two variables.' The reason two methods wereused to obtain derivatives for the gradient and quadratic hill-climbing algorithms

one more expensive but likely to be more accurate and one less expensive butlikely to be less accurate----was to see how sensitive the results were to the wayin which the derivatives were obtained. Box. [)avics, and Swaun [5], for example,report that their experience is that "gradient methods employing numericaldifferentiation are (with the exception of Stewart, 1967) usually inferior to the bestdirect search methods, and therefore not recommended." The results in thisstudy do not confirm this view.

In the programs, the algorithms were taketi to have converged when theabsolute value of the difference between the value of each variable on successiveiterations was within a prescribed tolerance level. The Powell algorithm wasgenerally more sensitive to the particular tolerance level used than werethe gradientand quadratic hill-climbing algorithms, and for the results in Section 4 two setsof runs were obtained using the Powell algorithm, corresponding to two differenttolerance levels.

Studies that have been done comparing different computational algorithmshave tended to limit the size of the problems considered to 20 variables or less.This is true, for example, of the comparisons in Bard [3]. Box [4]. Goldfeld andQuandt [11], KOwalik and Osborne [16], Murtagh and Sargent [17], Pearson[18], and Stewart [25]. Powell [22] reports that the DFP algorithm using analyticderivatives has been successful for problems of size 100 and that his 1964 algorithmand the DFP algorithm using numeric derivatives in the manner proposed byStewart have solved problems of size 20.1 Wolfe [26] states that the upper limitto the size of problems that can be solved in which derivatives can be calculatedanalytically is around 100. For problems in which derivatives cannot be calculated,Wolfe's diagram indicates that the upper limit is about 10. The results reportedbelow indicate that the upper limit to the size of problems that can be solved whenderivatives are not calculated analytically is much larger than 10 or 20. The largestproblem solved below was of size 239, arid a number of problems between size59 and 100 were solved. In fact, one of the main reasons why the method proposedin this paper appears feasible for most econometric models is the ease in whichalgorithms appear to be able to solve large problems even when analytic derivativesare not calculated.

4. AN EXAMPLE USING A LINEAR MODEL WITH A QUADRATICOBJECTIVE FUNCTION

The method proposed in Section 2 was first used to solve one of the optimalcontrol problems solved by Chow [6] for his nine-equation, linear econometric

Using the notation in footnote 14, the formula used for the own second derivatives is(f(a + i, h) - 2f(a, hI *- fIt: . t:. b))s2. T1e two formulas used for the cross partial derivatives are(f(a+e,h + ,i)f(a E.h-4- i;)-f(a +E,h-11)+f(a-::,h --))4t and if(a4-s..h +ij)flu h + ,) - ftu hj + f(a. b))isq.where = O.000lborO.00000I. whichever islarger. In thesecond

formula, values for f(a, b + ol and! (a + e. blare available from the own second derivative calculations.

' Box, Davies, and Swann [5]. p. 32.Powell [22]. p. 95Wolfe [36], pp. xi-xii. It should be noted, however, that it is not clear from Wolfe's notes whether

for these particular figures Wolfe is also including problems in which there are inequality constraints.

139

Page 7: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

L

I

model The model has two control variables. ('how solved various JO-periodOptimal control problems corresponding to diilreiit quadratic obtective functions(to be minimized) T}i problem chosen to solve in this study is the second problemin Table 3 of Chow [6]. Two control variables and ten periods means that thereare 20 variables to be determined The initial values for the 20 variables werechosen to be zero, although in practiceone could obviously Choose better initialvalues thaii these. The results of solving this problem are presented in the firstrow of Table 1. Two runs for the Powell algorithm are reported, one which useda tolerance level of 0.0005 and one which used a tolerance level of 0.00001 Tworuns each for the gradient and quadratic hill-climbitig algorithm are also reported,corresponding to the two ways oIcomputin derivatives. The lauer two algorithmsused a tolerance level of 0.00001

Powell's no-derivative algorithm required 1687 function evaluations to attainthe Optimum using a tolerance level 010.0005 and 2,633 function evaluations Usinga tolerance level of 0.00001. The value of the objective function at the stoppingpoint was smaller for the smaller tolerance level, but only by a very small amount.The corresponding variable values for the two runs agreed to three significantdigits, with the largest difference being 0.00015 (0.70272 vs. 0.70287). The gradientalgorithm required 614 function evaluations to attain the optimum using onefunction evaluation per derivative per variable and 1,033 function evaluationsusing two. The value of the objective function at the stopping point was smallerfor the second run, but again by only a very small amount. Thecorrespondingvariable values for these two runs also agreed to three significant digits. Thequadratic hill-climbing algorithm required 929 function evaluations to attain theoptimum using one function evaluation per cross derivative and 3.209 functionevaluations using four. For these two runs the values of the objective function atthe Stopping point were the same. The time per function evaluation for the ('how-model, JO-period problem was 0.0018 of a second. The optimum obtained forthis problem was the same as Chow had obtained

The optimal control problem for the Chow model was next made progressivelylarger by increasing the time horizon. The largest problem considered was a timehorizon of 50 periods, which meant that there were 100 variables to estimate.The results for 40, 60, 80. and 100 variables are presented in rows 2 through SinTable I respectively For the various problems the gradient algorithm clearlydominated Powell's in terms of speed ofconvergence. The use of the smallertolerance level for the Powell algorithm increased the number of function evalua-tions considerably and the values of the objective functions at the stopping pointswere only slightly larger for the larger tolerance kvel. Likewise for the gradienialgorithm the values of the objective functions at the stopping points were onlyslightly larger for the fLiflS using one function evaluation

per derivative For thequadratic hill-climbing algorithm no accuracy at all was lost using one funjonevaluation per cross derivative The quadratic hill-climbing algorithm was nottried after 40parameters although the use of the algorithm for problems of, say.size 100 is not completely out of the question. Using the less expensive way ofobtaining cross derivatives

it requires O.5N2 + l.SN functionevaluations tocompute the vector of first derivatives and the matrix of second partial derivativesper iteration (where N is the number of variables). If four iterations are required

140

Page 8: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

0

Not

es:

Pow

ell

Pow

ell [

2!].

Gra

dien

tG

radi

ent a

lgor

ithm

that

use

s ra

nk o

ne c

orre

Ctio

n fo

rmul

a. S

eeP

owel

l [23

1.

p. 4

1.H

ill-c

limbi

ngG

oldi

eld,

Qua

ndt,

and

Tro

tter

[12]

.nc

= n

ot c

ompu

ted

Ans

wer

to 3

plu

s tr

end

valu

es o

ther

wis

e.(1

rud

lent

I) F

P s

a r

iabl

e m

etric

alg

orith

m. S

ee P

owel

l [23

. p.

7.

TAB

LE I

RLS

UL1

'S O

R C

HO

WM

OD

IrL

t Gra

dien

t' A

lgor

ithm

pre

sent

ed in

equ

atio

ns (

3!)

and

(32)

in P

owel

l [23

,. P

. 41

Cho

w m

odel

: 9 e

quat

ions

linea

r, la

gs o

f firs

t ord

er: w

elfa

re fu

ctto

n is

qua

drat

icF

irst r

un F

or P

owel

l for

eac

h pr

oble

m u

sed

tole

ranc

e le

sel o

f1(

0005

, Sec

ond

run

used

0000

01.

Firs

t run

for

Gra

dien

t for

eac

h pr

oble

m u

sed

less

esp

ensi

xe W

a'of

obt

aini

ng Ii

rst

deriv

ativ

es S

econ

d ru

n us

ed m

ore

expe

nsiv

e w

ay.

Firs

t run

for

Hill

-clim

bing

for

each

pro

blem

use

d le

ss e

xpen

sive

Wa'

,'of

oht

uiis

ing

cros

s

part

ial d

eriv

ativ

es, S

econ

d ru

n us

ed m

ore

expe

nsiv

e w

aT

oler

ance

leve

l for

Gra

dien

t and

Hill

-clim

bing

was

0.0

01(1

11.

0 C a c-i a a L

'a 0 a a z0 0 7

a a so

a 5)5)

E H

C,_

0

z.

cIa a-'

>0

0 I-

0 0;a a >0

z_a; z

>0

- 5))

0.12

4945

700.

1 24

9455

80.

4782

7742

0.37

52 7

665

1.47

2472

51.

4721

700

4.24

0065

34.

240

0560

11.8

7544

211

.875

411

4. 2

400

573

4.24

1)1)

560

1.47

2472

(11.

4726

138

1.47

247

13

1.47

2 3

700

3.2!

7.1)

7

22.2

155

.41

929

3.20

93.

450

12.8

11)

4 4 4 4 xc xc xc xc

11.1

249.

1558

11.1

2494

555

0.47

8276

680,

4782

7666

((.8

6536

8

(471

842

I(9

,585

81)

453.

37O

t

1.37

8 32

41

4 52

1)95

93

49 5

889(

1

149

565i

(I

1 2 3 4 5 6 *7 t8

2 2 2 2

10 20 30 4))

50 40 30 30

2))

40 60 80 01)

60 60 60

0's 0's

0's

Os

Os 0".

0's

0.00

18

0003

4

0.00

50

11.1

)067

0.0)

185

0.00

67

0.))

051t

0)8)

50

3.27

4.70

17.3

821

,51

41,7

854

.37

81.2

911

)2.8

3

129.

9416

7,62

32.6

042

.60

I .66

72.

633

4,75

26.

762

7,8

2010

,830

10,9

605,

371

14,6

8319

. 89

3

6,25

36.

253

14 23 20 30 22 32 23 34 25 35 IS IS

0.12

4945

780.

1249

4558

0.47

8277

350.

4782

7668

1,47

2470

71,

4724

700

4.24

0057

14.

2400

560

11,8

7541

111

.875

41)

4.24

0058

04.

2400

580

l.3 1% 6.44

10.4

217

,61

29.9

534

.27

63.4

257

.54

04.5

5(2

.04

2022

26,1

440

.25

27,6

947

.5'?

614

1.1)

33

1.57

52.

854

2.94

55.

465

4.43

28,

517

5,85

411

.156

1,39

6

2,84

24,

499

7,45

54,

836

8,79

0

21 21 32 32 42 42 49 51)

53 53 16 17 64 57 68 67

Pow

ell

Gra

dien

tH

ill-C

limbi

ng

Page 9: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

to attain convergence, then roughly .20.600 function evaluat;ons Would be requiretito solve the 100-variable problem.

Adding extra periods for the Chow model in general had little effect on theoptimal variable values of previous periods. so that, for example, the answer tothe 60-variable problem was close to the answer to the 80- or I 00-varithle problemfor the first 60 variables. In view of this, the answer to smaller problems shouldhe a good starting point for larger problems, and so to test this, the answer to the60-variable problem was used as a starting point for the first 6() variables of the80-variable problem. Starting points for the other 20 variables were obtained byletting the values of the two control variables grow by 6 and 5 percent respectivelythese figures being obtained by observing how the control variables were growingin the answer to the 60-variable problem. The results of this test are presentedin row 6 of Table 1. For the gradient algorithm the number of function evaluationswas cut by about a factor of 3 (from 4.432 to 1.396 and froni 8,517 to 2,842) asubstantial savings. For the Powell algorithm the number of function evaluationswas cut from 10,960 to 6,253 using the larger tolerance level and from 15,371 to6,253 using the smaller tolerance level. lii both cases for the Powell algorithm, aslightly smaller value of the objective function was oblained by starting the variablevalues from zero.

As a final test using the Chow model, two other gradient algorithms weretried for the 60-variable problem. The results are reported in rows 7 and 8 ofTable I. Neither algorithm worked as well as the rank one algorithm. The DFPalgorithm required about 1,554 more function evaluations than did the rank-onealgorithm for the run using one function evaluation per derivative. For the runusing two function evaluations per derivative, the DFP algorithm did not quiteattain the optimum.

5. AN EXAMPI!: USING A NONLINEAR MODEL WITH A NON QUADRATICOIUEC'T!VE FUNCTION

The method of Section 2 was next used to solve a more complicated optimalcontrol problem. The model used was the Fair model [8], less the monthly housingstarts sector. The model used consists of 19 equations, is nonlinear, has lags ofLIP to eighth order, and was estimated under the assumption of first-order serialcorrelation of most of the error terms.' ' The initial period was taken to he 1962111and the horizon for the various runs was either 10. 20. 25. or 60 quarters. Thenumber of control variables was varied between one and four. Governmentspending was always taken to be a control variable. The other three variablesthat were Sometimes used as control variables were the leve! ofconst,mer sentiment,plant and equipment investment expectations, and nonlai-m quarterly housingstarts. These latter three variables are clearly not variables under the direct controlof the government, but for purposes of illustrating the method of solution, thereis no harm in treating them as if they were. The objective function was deliberatelychosen to be non-quadratic in the variables of the model. The objective function

'The coefficients were laker, from Table 11-4 in [8.

142

Page 10: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

(to be minimized) was:

10(g)2 10 LRr - 0.03() 2± (c

- (th94)

± (0.275)

+ (

- 0.257)

+ +0.038).

where g is the rate of growth (at an annual rate) of the private output deflator.UR, is the unemployment rate, and the five ratios are the ratios of durable con-sumption, non-durable consumption, service consumption. plant and equipmentinvestment, and housing investment to gross national product respectively. Theslashes around UR - 0.030 denote the fact that UR, - 0.030.; was taken to beequal to UR, - 0.030 if UR, 0.030 and zero otherwise. In other words, welfare

was not improved for an unemployment rate below 0.030. but it was not decreased

either, as a straight quadratic function would imply. The objective function isnon-quadratic in this respect, as well as in targeting ratios of the various com-ponents of GNP to GNP itself. The rate of inflation and the unemployment ratewere weighted ten times more heavily in the objective function than were theratios. It should be noted that the welfare function is not differentiable atUR, = 0.030. In the present case. however, the optimum values of UR, were alwaysgreater than 0.030, and the lack of differentiability at UR, = 0.030 did not appear

to be a problem for the algorithms for which numeric derivatives had to be com-

puted. In general, if the lack of differentiability of either the model or the welfarefunction appears to be important (as it might be, for example, for models in whichcapacity ceilings play an important role), then algorithms that do not require thecomputation of derivatives may be better choices than those that do.

The results for the various runs using the Fair model are presented in Table 2.The second control variable, the level of consumer sentiment, does not enter themodel currently, but only with lags of one or more periods, so when this variablewas used as a control variable, the number of values of this variable to be deter-

mined was one less than the number of periods. Except for lines 7 and 8, historicvalues were used as starting points for the values of the control variables. Again.two runs each for the gradient and quadratic hill-climbing algorithms are reported.corresponding to the two ways of computing derivatives. The tolerance level usedfor these two algorithms was 0.00005. The tolerance level used for the Powellalgorithms was 0.000005.

From the results in Table 2, it can be seen that the gradient algorithm workedbetter than Powell's. The number of function evaluations was usually less for thegradient algorithm, and for the problems of greater than 20 variables the Powellalgorithm did not quite attain the optima that the gradient algorithm did. Forthe 39- through 99-variable problems, the largest differences between the variablevalues computed by the Powell algorithm and the corresponding variable valuescomputed by the gradient algorithm were 26, 8, 34, and 88 percent respectively.An even smaller tolerance level was tried for some of the runs using the Powell

143

Page 11: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

TAB

LE 2

RES

ULT

S FO

E FA

IR M

OD

EL

Pow

ell

Gra

dien

tH

iU-C

'flni

bjng

.J'2

51;

25t'2

5't

'25

'-0

0--

'E'

'.>c

073

I10

0hi

st.

038)

728.

4011

235,

1)2

I20

20hi

st.

0.01

4832

.67

2,15

2vd

(2

2079

hIs!

,1)

0148

48.1

63.

142

sal

43

2(1

59ht

SI.

0.01

4884

165.

580

val

54

2079

hisl

.00

148

156.

2010

.513

Cdl

64

2999

hist

.00

181

23)

4012

.822

vaT

74

oO2)

9a

((04

39

42)

)79

h(1

.014

,819

II2,

6(8

2))

69hi

st0.

1)11

8sa

l3

205'

)hi

si.

0,01

45ca

l

0211

(180

97

Sec

Tab

leI.

role

ranc

e (e

sel f

or P

owel

l was

0.0

0000

5T

oler

ance

leve

l for

Gra

dien

t and

Hill

-clim

bing

was

0.0

0)10

9*

Gra

dien

." D

FP

var

iabl

e m

etric

alg

orith

m,

t Gra

dien

tA

lgor

ithm

pre

sent

ed in

equ

atio

ns13

)) a

nd (

32)

in P

owel

l 2'.

p 41

Ans

wor

to 6

plu

s tr

end

valu

es o

ther

wis

e,A

nsw

er to

4 p

lus

hist

oric

al v

alue

s ot

herw

ise

I' ai

r m

ode)

19 e

q ui

I io

ns, n

un it

nea

r. Ia

s of

tip

to e

tgh

h or

der

firs

-ord

er s

end)

cor

n-li.

in-n

of t

lie

erro

r ic

r 'u

s in

flio

s I o

f the

equa

tions

: wel

fare

func

tion

is n

otu

Id r

ot

120,

0769

1705

31.

351.

8012

0.16

4271

334.

788.

7110

5)8

o396

20.5

340

,39

Ia01

6290

7)1

562

73.6

45

0.16

2592

5413

.82

197.

2614

0.20

6249

9520

4.4

3847

3iv

1189

.51

4((

.162

4959

%11

0.6)

)96

,45

35.1

273

,98

3553

72.5

5;>

>;

639

11.0

7691

71)

482

9)26

94

0076

917(

147

07I

0.16

427(

153

(545

929

40

6427

052

225

a0.

0769

1704

86.

4380

94

11.0

7691

7(14

70

I IK

( 44

7

1.37

12'

)0

6)73

695

6326

7.28

44

0 67

7369

7

573

20.

1642

7052

52.6

3.2(

194

(1.1

6427

052

1, 2

00u9

2 74

475

0 16

2681

05

2.75

632

(),l6

7369

319

8.52

2.17

64

(1 ln

)77f

,97

U 2

(t0%

o97

7714

840

l624

l3o

4.78

70.

1628

8104

1)20

081(

97

10,1

8195

021)

5103

2flC

12.8

(17

770.

1623

4169

1)70

0600

7

25,6

6104

0588

6795

%ne

19.6

)195

0.20

5) 1

03(1

II 70

7506

9

7,04

7I

0 16

2)41

701)

5) t3

0%(

p

2.30

54

(II 6

286)

0612

.793

770

1624

I6y

0 .6

266(

0

2.33

615

((16

2881

(15

4.82

17%

0.16

2881

(14

II 2(

)i)S

'fl

4777

3(1

,161

8810

4

Page 12: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

algorithm (0.0000001 vs. 0.000005) to see if this resulted in a smaller value of theobjective function, hut the results were not improved using the smaller tolerancelevels. For the gradient algorithm the use of the less expensive way of obtainingderivatives resulted in virtually no loss in accuracy for any of the runs. For thequadratic hill-climbing algorithm the use of the less expensive way of computingcross partial derivatives resulted in no loss in accuracy at all and, of course,substantial savings on cost. For the problem of 4 control variables and 25 periods(99 variables), the gradient algorithm using the less expensive way of computingderivatives required 10,181 function evaluations and took about 3.4 minutes toattain the optimum.

When the 79-variable problem was started from the answer to the 59-variableproblem plus historical values otherwise (line 8), the speed of convergence wasonly slightly increased for the gradient algorithm. The number of function evalua-tions fell from 7,314 to 7,047 for the one run and from 12,807 to 12.793 for theother. The number of function evaluations fell substantially for the Powellalgorithm, but the optimum was still not attained.

When the other two gradient algorithms were tried for the 59-variableproblem (lines 9 and 10). the results were virtually the same as for the rank onealgorithm. For this problem there is nothing to choose among the three algorithms.

The largest problem tried for the Fair model was four control variables and60 periods (1962111-197711) for a total of 239 variables. The answer to the 99-variable problem was used as a starting point plus historical or extrapolatedvalues otherwise. Only the gradient algorithm using the less expensive way ofobtaining derivatives was tried for this problem. The program was allowed torun for approximately 20 minutes. At the end of 20 minutes and 104 iterations,the value of the objective function was changing only in the eighth decimal placebetween iterations and the largest difference between any corresponding parametervalues on the last two iterations was 0.0007. The value of the objective function atthe starting point was 0.80730797 and the value after 104 iterations was 0.58885958.The starting point turned out to be fairly far away from the stopping point, withunemployment rates of about 7 percent near the end of the horizon comparedwith the stopping-point values of around 5 percent. The stopping-point valuesfor the 239-variable problem appeared to be in line with what would be expectedfrom observing the answers to the smaller problems. The Powell algorithm wasstarted from the values attained by the gradient algorithm on the 53rd iteration(an objective-function value of 0.58890611) to see if it would go anywhere. Atolerance level of 0.000005 was used. The algorithm went one iteration, loweredthe objective function to 0.58890571. and stopped (the convergence criterionhaving been met for all parameters). a clear failure in view of the value obtainedby the gradient algorithm. One other result is also of interest to note here. Thegradient algorithm was also started from the values attained on the 53rd iteration.A tolerance level of 000005 was used. The algorithm went one iteration, loweredthe objective function to 0.58890575, and stopped (the convergence criterion havingbeen met), also a clear failure. By starting the gradient algorithm over on the 53rditeration, one lost the approximation to the inverse of the matrix of second partialderivatives that had been developed over 53 iterations, which in the present casewas obviously quite important. A similar result occurred when experimenting

145

Page 13: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

with the 99-variable problem. These results suggest that if one contemplates havingto restart the gradient algorithm for one reason or another (like rUnning Out of timeon the computer), one ought to save the lalet approximation to the inverse ofthe matrix ol second partial derivatives to he used when the algorithm is restartedThe results also suggest, oddly enough. that when using the gradient algorithmone ought not to start the algorithm too close to the (presumed) optimum for fearthat the algorithm will get stuck before it has a chance to build up a good approxi-mation to the inverse of the matrix of second partial derivatives.

The answers to the problems for the Fair model were characterized by alarge value ofgovernment spending in the first period (compared with the historicalvalue) and large values near the end of the time horizon. In the model employmentresponds faster to government spending than does the price level, and so therelatively large values of government spending for the last few periods of thehorizon are taking advantage of this fact and lowering the unemployment ratewithout having too much effect on the price level.2" The large value of spending inthe first period is apparently designed to lower the unemployment rate quicklyfrom its relatively high historic level. Excluding beginning and ending effects, theparticular objective function used resulted in an unemployment rate of about5.0 percent and an annual rate of inflation of about 2.2 percent. The lP1GNpand lIiijGNPr ratios were met almost exactly when plant and equipment invest-ment expectations and housing starts were used as control variables, as would heexpected. The three consumption ratios were not met as exactly when consumersentiment was used as a control variable since in this case there was, in effect,only one main control variable influencing three ratios.

In Table 3 are presented estimates for each run in 'fables I and 2 of the per-centage of time that was spent doing function evaluations. The estimates wereobtained by multiplying the time per function evaluation by the number of functionevaluations and dividing this figure by the total time for the job. For the Fairmodel abnormal exits sometimes occurred from the function-eviIuation program(before all of the computations were performed), which causes some of the per-centages for the Fair model in Table 3 to be too high. Abnormal exits occur whenvariable values imply that the logarithm of a negative number should be taken.The estimates in Table 3 are also subject to error for reasons that have to do withthe way that computation time in the computer is estimated. In general, thepercentages are quite high in Table 3. indicating the importance ofwriting efficientprograms for evaluating functions.

6. AN EVALUATION OF TIlE PRACTJCAL USEFULNESS OF THE METHOD

The results in Sections 4 and 5 are very encouraging as to the feasibility ofusing the method proposed in Section 2 even lot' large-scale models. For a 20.period problem the l9-equation Fair model takes 0.0148 of a second per functionevaluation on the IBM 360-91 computer. The Fair model can be solved without20 To avoid undesirable end-point effects in practice, one can always extend the horizon a fewperiods beyond the actual horizon of interest. For the Fair model it appeared that the horizon shouldbe lengthened by about Sq uarters. Because of the end-point effects, the last few answers to the 99-variableproblem for each control variable were not used as starting points for the 239-variable problem

146

Page 14: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

I

TABLE 3ES1tMAiIS 01 P1RcI;NrA;F i Tioi SI'INl DOINO FU,crIuN Fv.l1JAi IONS

From Table I

From Table 2

the use of the Seidel method since the nonlinear part of the model is recursive.If a 100.equation model could be solved in the same way, it should take onlyabout five times longer to solve this model titan it takes to solve the Fair modelsince the number of computations per equation is not likely o vary much frommodel to model. Econometric models tend to be larger because of more equationsand not because of more variables per equation. If the Seidel method must beused to solve a model and if for each iteration for each period the entire modelmust be passed through, then the cost per solution of the model is increased inproportion to the number of iterations that are required to solve the model eachperiod. If, for example, it takes five iterations to solve a 100-equation model eachperiod, it should take about 25 times longer to solve this model than it takes tosolve the Fair model. Since algorithms that do not require derivatives or for whichderivatives are computed numerically spend most of their time doing functionevaluations, the total time that it takes to solve a control problem for a 100-equation model that requires five iterations per solution of the model should heabout 25 times greater for the same problem than the corresponding time in Table 2for the Fair model. A 20-period problem with one control variable should thustake about 2.0 minutes using the gradient algorithm and the less expensive way

147

Powell Gradient Hill-ClimbIng

Row (1) (2) (Ii (2) (I) (2)

93 97 83 95 52 82

2 93 95 83 93 53 79

3 94 90 83 91 --

4 90 92 87 90

5 97 95 86 91

6 98 98 78 94 -

7 -- 86 93

87 92

Row

Powell Gradient Hill-Climbing

(I) (2) (1) (2)

1 96 87 90 83 91

2 97 95 97 89 91

3 97 97 101 77 91

4 98 97 96 -5 100 95 96 --

6 100 90 92

7 95

8 99 94 96

9 -- 97 96

10 97 97

Page 15: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

of obtaining derivatives (25 < 4.7 seconds). A 20-period problem with twocontrol variahks should take about X.7 minutes (25 20.83 ecoiidsj The problemoffourcontrol variablesand 25 penodsshould takeahout 85.2 minutes(25 x 204.47seconds).

Although the times just mentioned are riot completely out of the range ofpracticaIit, it is possible that in practice the times can he substantially cut dowfl,First, good starting points can be quite important, and significant time may hesaved by first solving a small problem (say one control variable), using the answerto this problem as a starling point for a somewhat larger problem (say two controlvariables), and SO on, building up to the largest problem that one wants to consi(IerAlso, once one has solved a particular optimal control problem once, the answerto this problem may be a good starting point for a slightly different prohleii (say,a slight change in the objective function). In other words, it may not he too costlyto experiment with different objective functions or a slightly different specificatjor

of the model once one solution to a particular problem has been obtained. It mayalso he the case that from a welfare point of view or from the point of view offeasibility one wants to keep the control variables within certain hounds. Thiscan be done by including control variables in the objective function and penalizingdeviations of the values of the control variables from target values, If this is done,one has a natural starting point for the control variables--the target valuesandthis may significantly increase the speed of convergence of the algorithm being used,in addition perhaps to decreasing the likelihood that the algorithm goes to a localbut not the global optimum.A second way in which much time might be saved by models that need to hesolved by the Seidel method is by choosing good initial values of the endogenousvariables to begin the solution of the model each period. Since most algorithmsperturb the variables (in the presence case, the values of the control variables) onlya slight amount between function evaluations, particularly when derivatives arebeing computed, a good choice for the initial values of the cndogenous variablesis likely to be the solution values obtained in the process of computing the previousfunction evaluation, It is possible that this choice can cut the nutnher of iterationsneeded per solution of the model per period to two or three, which would greatlysave on cost.

A third way in which time can he sacd is to write the prograni that doesfunction evaluations in such a way that no computations are performed otherthan those that are absolutely needed in going front values of the control variablesto the value of the objective function, For example, any sets of calculations usingexogenous variables that are not changed as a result of changes in the valuesof the control variables should not he done in the function -evaluation prog-ram, hut only once before the solution of the optimal control problem begins.This kind of efficient programming was not clone for the results in Tables Iand 2.If for a IOO-equation model one could, by following the above suggestions,cut the number of iterations using the Seidel method to an average of 2.5 andcould further cut the time per function evaluation by 25 percent, then the timesquoted above (2.0, 8.7, and 85.2 minutes) would he cut to 0.75, 3.3, and 32.0minutes respectively These times may he further cut by a factor of 2 or more

148

Page 16: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

by better choices of initial parameter values than those used for the results in

Table 2.21

in terms of the sii.e of the piolikitis that the method proposed in this papercan handle. there is an obvious tradeoff between the size of the model, the nuniherof control variables, and the length of the decision horizon, it is hard to establishany precise rules as to what problems are practical to solve and what arc notbecause no two niodels and problems are the same. Furthermore, for sonicproblems one algorithm may work best and for others another may ork best.Each person must to sonic extent determine for oneself through experimentationthe practical limits to the size of problems that one can solve. Nevertheless, theresults in this study can give some indication of the likely cost of various problems.One important question in this regard is how rapidly the number of functionevaluations increases as the number of variables to he estimated increases. Fromthe results in Tables I and 2 one can compute the extra number of functionevaluations required per additional variable (AFE;AN, where FE is the numberof function evaluations and N is the number of variables) and observe how thisquantity varies as the total number of variables varies. These computations arepresented in Table 4. For the quadratic hill-climbing algorithm. AFE AN clearlyincreases as N increases since the number of function evaluations required tocompute first and second derivatives per iteration increases as the square of N.From the results for the Chow model there is only a slight tendency for AFEANto increase as N increases for the Powell and gradient algorithms. From the resultsfor the Fair model there is somewhat more of a tendency in this direction for thetwo algorithms, but this tendency is far from being uniform. In general, the resultsin Table 4 indicate that there is only a slight tendency for AFE1AN to increase asN increases for the Powell and gradient algorithms.

The time required per function evaluation should be roughly proportionalto the number of periods times the number of equations in the model times thenumber of Seidel iterations required to solve the model. The time required tosolve a control problem is roughly equal to the time required per function evalua-tion times the number offunction evaluations. If the number of function evaluationsvaries only in proportion to the number of variables (AFE/AN not increasingas N increases), then the time required to solve a control problem should heroughly proportional to the square of the number of periods times the number ofcontrol variables times the number of equations times the number of Seideliterations. In this case, if the number of Seidel iterations required to solve a modeldoes not increase as the number of equations of the model increases, then the time

21 Albert Ando has communicated to the author a "conservative" estimate that for the solutionof the 200-equation FMP model it takes about 0.00500 of a second per iteration per period on an IBM370-165 computer. This figure compares with 0.00072 for the solution of the t9-equation Fair model(divide 0.0072 in Table 2 by 10). Since the FMP model has 10.5 tImes more equations than the Fairmodel, one would expect the time per iteration per period to be about 10.5 times greaier for the FMPmodel. The figure supplied by Ando indicates that the time is only 6.9 limes greater. Ando's resultsthus suggest that the times cited in the text above may be too conservailve. It should also be notedthat Ando's results are for a program that was not written with optimal control problems in mind.

The FMP model usually takes between 10 and 15 iterations to solve per period using the Scidetmethod. However, the values used as initial values for the endogenous variables are the solution valuesof the previous quarter. and. as suggested above, in an optimal-control context one should be able todo much better than this.

149

Page 17: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

lABLE 4V.iui:s 1)1 Al F AN

From Table I

From Table 2

N = number of variables. FE = number of function evaluations.The 239-variable run was started from a more accurate point than the others and was terminatedat a tolerance level of only .0007 versus .00005 for the others.

required to solve a control problem should increase only in proportion to theincrease in the number of equations. Otherwise, the time will increase more thanin proportion to the increase in the number of equations.22 The time required tosolve a control probletn is proportional to the squcire of the number of periodsbecause an increase in the number of periods increases both the number of variablesand the time required per function evaluation. Jfthe number offunctioti evaluationsincreases more than in proportion to the number of variables, then the time requiredto solve a control problem will increase more than in proportion to the increasein the square of the number of periods times the number of control variables.Barring further results, some tentative conclusions can be drawn from theresults in this study as to the size of problems that it appears feasible to solveusing the method discussed in Section 2. For models of about 20 equations, itappears quite practical to solve problems in which the product of the number ofcontrol variables and the number of periods is greater than 100. For models ofabout 100 equations,a product of 100 is probably within the range of practicality.For models of about 200 equations, a product of 60 may be close to the limit ofpracticality. The use of good starting points and efficient programming may, ofcourse, greatly extend even these limits. Since most econometric models do not22 If the objective function to be maximized becomes less well behaved as the number of equationsincreases, this should also cause the time required to solve a control problem to increase more thanin proportior to the increase iii the number of equations. Without further experimentation using othermodels it is not clear how sensitive the shape of the objective function is likely to be to the number ofequations in the model.

150

N AN

Powell Gradient

(1) (2) (II 2) (I) 12)

20406080

100

2020202020

84.4153.3153.4157.0196.2

141.6216.8214.5238.1236.1

30748.168.574.4ii.!

51.791.1

130.6152.6132.0

46.5126.1

160.54801

AN Powell

Gradient lIilICIinsbing

(II (2)(I) (2)

JO

203959

10101920

112.3102.9

fl121.9

16.314.456.048.7

22.534.8

114.9101.6

26.966.0

123.9

80.9240.047t.9

79 20 246.7 248.5 401.099 20 115.5 143.4 341.2239 140 - I10.6

Page 18: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

exceed 200 equations and since the number of control variables in any one modelcan usually he kept under, say, five without seriously restricting the problem, themethod considered in this paper should be able to handle most problems of interestto policy makers who use econometric models in their decision-making process.

It should also be noted that the method considered in this paper requires relativelylittle human effort. All one has to do is write a program to solve the model and com-

pute the objective function. No derivatives are required, no analytic approxima-

tions have to be made, and the model does not have to be set up in any special form.

The results in Tables I and 2 indicate that the gradient algorithm using theless expensive way of obtaining derivatives is the most efficient. Slightly moreaccuracy maybe obtained by using the niore expensive way of obtaining derivatives

or by using the quadratic hill-climbing algorithm, but in general this increased

accuracy is not likely to be worth the cost. For the quadratic hill-climbingalgorithm

no accuracy was gained using the more expensive way of computing cross partial

derivatives, and so this way is not recommended. The Powell algorithm wasgenerally more expensive than the gradient algorithm, and for the Fair model ithad a tendency to get close to but not quite to the optimum. The results in the

two tables do, of course, indicate that quite large problems can be solved even

when derivatives are obtained numerically. In practice, it may be desirable, after

having attained an answer from one algorithm, to start another algorithm fromthis answer to be more certain that the true optimum has been attained. Thequadratic hill-climbing algorithm, while being the most expensive for largeproblems, is likely to be the most robust to attaining the true optimum.

7. STOCHASTIC MODELS

In the case ofa linear model with additive error terms and a quadratic objective

function it is well known that solving the deterministic control problem derivedby setting the error terms to their expected values will provide the optimal first-period control values for the stochastic, closed-loop, feedback control problem.Therefore, if one solves the deterministic control problem each period, afterobservations on the state of the system for the previous period become available,

one will over time make the same decisions regarding the current values of thecontrol variables (i.e., the values of the control variables that the decision makeractually sets) as would be made by one who had solved the stochastic, closed-loop,feedback control problem explicitly in terms of feedback equations. To this extent.feedback equations need not be obtained, and one can concentrate on solving

deterministic control problems as considered in the previous sections of this

paper.23 For most economic applications sufficient time is usually available torecompute the entire sequence of optimal controls each period.

For nonlinear models the first-period certainty-equivalence property does nothold. One procedure that might be followed in this situation is merely to treatthe nonlinear-model case in the same way as one would treat the linear-model case,

i.e., setting error terms to their expected values, and solve the deterministiccontrol

23 Knowledge of feedback equations for a particular model may aid one in understanding the

dynamic properties and other characteristics of the model, and for this reason it may be useful to

compute feedback equations even though they are not actually needed for the solution of the optimal

control problem.

151

Page 19: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

problem each period. This procedure is probably the one most often used in practicefor solving nonlinear models, although Howrev and Kelejian 114] have shown thatsolving a ilotilitleat inode by seltilig [lie coot tetitis equal to their eXpected valuesis not equivalent to solving the reduced-form equations of the model.

For a nonlinear model the mean values of the endogenous variables cart beobtained by means of stochastic simulation. A number of drawings from the jointprobability distribution of the error terms can be taken, and for each drawing onecan obtain by solving the model a set of values for the endogenous variables.The mean value for each endogenous variable can then he computed as theaverage of the values obtained from solving the model for the various drawings.Using the procedure of stochastic simulation, it may he possible for relativelysmall problems to obtain optimal open-loop controls for nonlinear, stochasticmodels in a manner similar to that done above for nonlinear, deterministic models.Say the aim were to maximize the expected value of the objective function. Foreach choice ofcontrol values, one could compute by means ofsochasticsimulationthe mean value of W. The computed mean value of W would be the value returnedto the maxinlmzatioiì algorithm, and the algorithm would he used in the usualway in an attempt to find that set of control values for which the mean value ofW were at a rnaximuni. Each function evaluation in the stochastic case wouldcorrespond to an entire stochastic simulation. If, for example, 50 drawings fromthe joint probability distribution of the error terms were needed to obtain anadequate approximation to the expected value of W. then approximately 50times more time would be needed per function evaluation for the stochasticproblem then for the deterministic problem. Even though the cost IS 111gb for thestochastic problem, it may be feasible for small problems to carry out the abovesuggestion. If one did carry out the above suggestion and found the optimum andii one recomputed the entire sequence ofoptinial controls each period, one wouldover time make the same decisions regarding the current values of the controlvariables as would be made by one who had solved the stochastic, open-loop.feedback control probleni explicitly in terms of feedback equations.

For the control problem for nonlinear, stochastic models, Athans [1], [2] hassuggested first solving the deterministic control problem (tile deterministic problembeing obtained by setting the error terms equal to their expected values) and thenlinearizing around the deterministic-control paths to obtain linear feedbackequations around the paths. The aim is over time to keep the actual paths close tothe deterministic-control paths. While Athans' suggestion may be useful forengineering applications, where reoptimization each period may not he feasible.tile suggestion is likely to be of less use for economic applications. Ilsuflicient timeis available to reoptimize each period, then it is much more straightforward just tosolve the deterministic control problem each period.24 The results in this paper

These remarks should not be Interpreted as meaning that Athans would necessarily disagreewith them. For example. Athans ri. p. 449, has stated "it should he stressed that trends in stochasticcontrol research by engineers has been greatly influenced b two factors: (al a need to minimize on-linecomputations, and Ib) the requtrenienis in many aerospace applications that the control system berealized b analog hardware.

In economic applications these requirenIerlts are not present, since the time period betweendecisions does allow for extensive digital computer calculations. Thus, one does have the luxury ofexamining more sophlsi)cated decision and control algorithms, which hoxever haxe increased com-putational requirements."

152

Page 20: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

certainly indicate that it is feasible to reoptlnhi/e each period when, say. the

period isa month or a quarter. The procedure of reoptimizing each period IS atso

somewhat more appealing on intuitive grounds than Athans' procedure. Ifstochastic simulation is ruled out, then both procedures are based on the incorrect

practice of setting error terms equal to their expected values. If one follows Athans'

procedure. however, further approximations have to he made that do not have to

be made if one reoptimizes each period.

Princeioii (Jnit'ci'silr

RIlrR1:NcIs

I] Athans, Michael, ''The Discrete Time Linear-- Quadratic- Gaussian Stochastic Control Problem,''.4nnal.s of heonomu' and Sis ía! hh'wsurenzi'nI, 1 (October 1972). 449 491

[2] Athanc, Michael, "The Role and use of the Linear---Quadratic--GauSSIafl Problem in ControlSystem Design." iEEE lran'aetions on Autionatis Control, AC-I 6 (December 1971 ). 529 552.

[3 Bard. Yonathan, 'Comparison of Gradient Methods for the Solution of Non-Linear ParameterEstimation Problems," SM ti iVwn!rieal Anolt si', VII (March 1970). 157 186.Box. NI. J , ''A Comparison of Secral Current Optimization Methods, and the Use of Trans-formations in Constrained Problems,' Coin,iuii'r Journal. IX (Mas' I 966). 67 77.Box. NI J [). Davies. and W. H. Swann ..Von-1,inear Optiini:ation Tes/intijiws. Oliver and Boyd

L.td., Edinburgh. 1969.Chow, Gregory C., "how Much Could be Gained by Optimal Stochastic Control Policies,",InnaLs of Ei-onemic awl Sw-ia! th'asurcnicnL'. I (October 1972) .391 -406.

['7] Daridon. 'N. C., "Variable Metric Method for Minimization:' A.E.C. Research arid I)cselop-ment Report ANE.-5990 (Revised), 1959.Fair, Ray C., A Short-Rr,ir Fores'a.ctiwç' Moilel of tiii' U?iited States Eiono,uv. 1). C. heath and ('0..Lexington. 1970.Fletcher. R. and M. J. D. Powell. "A Rapidly Convergent Descent Method for Mininiiiation."C'ouipiiler Jciurna!, VI (July 1963). l63 -168.Fromm, Gary and Lawrence R. Klein, "Solutions of the Complete S)stem." in Duesenberr.James S.. Gary Fronim, Lawrence R. Klein. and Edwin Kuh. Tlu' Brookuzg .tliuh'l.' SnowFurther Results. Rand McNally & Co., Chicago. 1969. 362-42 I.

ill] Goldfield. Stephen M. and Richard E. Quandt. Nonlinear Met/wi/s in Leiinouiclra's. North-Holland Publishing Co., Amsterdam. 1972.Goldfeld. Stephen NI.. Richard E. Qttandt. and Hale F. Trotter. "Maximization by Quadratic-Ilill-Climbing." Ec'ono,netricu, XXXIV Jul' 1966). 541-551.Holbrook, Robert S., "A Practical Method for Controllrnga Large Nonlinear Stochastic Sstern'this issue.Howrey. F. Philip and h-I. H. Kelejian, "Simulation sersus Analytical Solutions: The Case ofEconometric Models." Chapter 12. in Navlor. Thomas I-I.. Conipuh'r Siniula!ion E.vperimi'n!swith :tfode/.s of Economic Systems. John \Vilev & Sons. New York. 1971.

[IS] Huang. H. Y , "Unified Approach to Quadratically ('onsergent Algorithms for Function Mini-iso/ation, ' Journal if Optunizalion i'/ii'iiry and Appluatw'is, V June 1970). 405 423.Kowalik, J. and NI. R. Osborne , .tls'thod.i for (,',ironstri,ineil Optwuzttiofl P'ithlc'm.'.. Elses icrPublishing Co., Nesv York. 1968.Murtagh. B. A. and R. V. U. Sargent. "Computational Experience with Quadratically ('onsergentMinimization Methods,'' C'imipu:er Journal, XIII (May 1970). 185 194.Pearson. J D., ''On Variable Metric Methods of Minimiiatiofl,'' ('o,npufer Journal. Xl (Ma1969). 171-178.Pindyck. Robert S.. "Optimal Stabilization Policies via Deterministic Control.' lnna/s 0/Es'ono,nic awl Social Mea'urenu'nt. 1 (October 1972), 385-389.Polak. E.. C'onputationizl th'thods in Optimwatwn. Academic Press, New York, 1971.Powell. M. J. D.. "An Efficient Method for Finding the Minimum of a Function of SeseralVariables without Calculating Derivatives," Computer Journal, VII tJulv 1964), 155-- 162.Powell, M J. D.. "A Survey of Numerical Methods for Unconstrained Optiniiiation." S/At!Ri'ris'iv. XII (January 1970). 79-97.

153

Page 21: Methods for Computing Optimal Control Solutions: On the ... · Solution of Optimal Control Problems as Maximization Problems ... Polak [20]. however. does ... set of runs derivatives

dll. M - J. I). "Rreent Advances in t!nconst ra:ncd ()ptim,a Lion," Pri,',,1j,,li,1I (October 1971), 26 7

Shupp, Franklin k., "Uncertaint' and Sta hilii.ation br a Nonlinear ModI,'' flu' Qua, !i'r/'Jour,,izl of Lcononij,'c, LXXXVI (Fchrtjar' 1972). 94 110125] Stewart, 0. W., Ill, 'A Modification ofDavidon's Minim,,atioii Method to Apt DiflrenceApproxiniations of Dero-atives,'' Journal of f/u' .4 i%O('uIf 10)1 of (?mpu!j,,r )fai/ufl('ri' XI \'(January 1967), 72 83.[26] Wolfe. Phihp, A review of some notesoiPhilij, Wolfe in Fletcher, k. ed., Oplimiz,,!/o,,

AcademicPress. London, 1969, xi -xv.

154


Recommended