qabel.gms : Linear Quadratic Control Problem

Description

```This is a QCP formulation of the original ABEL model. Note
that this model is convex and should be very easy to solve.
The Linear Quadratic Riccati Equations are solved as a QCP.
Nonlinear Programming Problem instead of the usual Matrix

QMax can be easily extended to 1000, that allows to pass
larger QPs to the solver.
```

Reference

• Kendrick, D, Caution and Probing in a Macroeconomic Model. Journal of Economic Dynamics and Control 4, 1 (1982), 149-170.

Small Model of Type : QCP

Category : GAMS Model library

Main file : qabel.gms

``````\$title Linear Quadratic Control Problem as QCP (QABEL,SEQ=293)

\$onText
This is a QCP formulation of the original ABEL model. Note
that this model is convex and should be very easy to solve.
The Linear Quadratic Riccati Equations are solved as a QCP.
Nonlinear Programming Problem instead of the usual Matrix

QMax can be easily extended to 1000, that allows to pass
larger QPs to the solver.

Kendrick, D, Caution and Probing in a Macroeconomic Model. Journal of
Economic Dynamics and Control 4, 2 (1982).

Keywords: quadratic constraint programming, Riccati equations, macro economics,
fiscal policy, convex optimization
\$offText

\$if not set qmax \$set qmax 75

Set
n     'states'   / consumpt, invest  /
m     'controls' / gov-expend, money /
k     'quarters' / q1*q%qmax%        /
ku(k) 'control horizon'
ki(k) 'initial period'
kt(k) 'terminal period';

Alias (n,np), (m,mp);

ku(k) = ord(k) < card(k);
ki(k) = ord(k) = 1;
kt(k) = not ku(k);

Table a(n,np) 'state vector matrix'
consumpt  invest
consumpt       .914   -.016
invest         .097    .424;

Table b(n,m) 'control vector matrix'
gov-expend   money
consumpt         .305    .424
invest          -.101   1.459;

Table wk(n,np) 'penalty matrix for states - input'
consumpt  invest
consumpt      .0625
invest                    1;

Table lambda(m,mp) 'penalty matrix for controls'
gov-expend   money
gov-expend          1
money                    .444;

Parameter
c(n)        'constant term'    / consumpt -59.4,   invest -184.7 /
xinit(n)    'initial value'    / consumpt 387.9,   invest   85.3 /
uinit(m)    'initial controls' / gov-expend 110.5, money   147.1 /
xtilde(n,k) 'desired path for x'
utilde(m,k) 'desired path for u'
w(n,np,k)   'penalty matrix on states';

w(n,np,ku)  = wk(n,np);
w(n,np,kt)  = 100*wk(n,np);
xtilde(n,k) = xinit(n)*power(1.0075,ord(k) - 1);
utilde(m,k) = uinit(m)*power(1.0075,ord(k) - 1);

* display w, xtilde, utilde;

Variable
x(n,k) 'state variable'
u(m,k) 'control variable'
j      'criterion';

Equation
criterion   'criterion definition'
stateq(n,k) 'state equation';

criterion..
j =e= .5*sum((k,n,np), (x(n,k)  - xtilde(n,k))*w(n,np,k)*(x(np,k)      - xtilde(np,k)))
+  .5*sum((ku,m,mp),(u(m,ku) - utilde(m,ku))*lambda(m,mp)*(u(mp,ku) - utilde(mp,ku)));

stateq(n,k+1)..
x(n,k+1) =e= sum(np, a(n,np)*x(np,k)) + sum(m, b(n,m)*u(m,k)) + c(n);

Model abel / all /;

x.l(n,k)   = xinit(n);
u.l(m,k)   = uinit(m);
x.fx(n,ki) = xinit(n);

option limCol = 0, limRow = 0, solPrint = off;

solve abel minimizing j using qcp;

display x.l, u.l;
``````