Debian Codegraph @

tests/steady_state/ramst_solve_algo_0.mod

raw
1 % Test solve_algo=0 (fsolve), and its companion “fsolve_options” option
2
3 var c k;
4 varexo x;
5
6 parameters alph gam delt bet aa;
7 alph=0.5;
8 gam=0.5;
9 delt=0.02;
10 bet=0.05;
11 aa=0.5;
12
13
14 model;
15 c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
16 c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
17 end;
18
19 initval;
20 x = 1;
21 k = 1;
22 c = 0.1;
23 end;
24
25 if isoctave
26 steady(solve_algo=0, fsolve_options = ('AutoScaling', 'on'));
27 elseif user_has_matlab_license('optimization_toolbox')
28 %% NB: The Display option is accepted but not honoured under Octave (as of version 7)
29 steady(solve_algo=0, fsolve_options = ('Display', 'iter'));
30 end