Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dynare
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MichelJuillard
dynare
Commits
e1856be5
Commit
e1856be5
authored
Nov 14, 2011
by
MichelJuillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing problems for computing steady state in ramsey policy
parent
7af760db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
matlab/dyn_ramsey_static.m
matlab/dyn_ramsey_static.m
+10
-9
preprocessor/SteadyStateModel.cc
preprocessor/SteadyStateModel.cc
+1
-2
No files found.
matlab/dyn_ramsey_static.m
View file @
e1856be5
...
...
@@ -47,23 +47,23 @@ if options_.steadystate_flag
end
ys
=
oo
.
steady_state
;
if
inst_nbr
==
1
inst_val
=
csolve
(
nl_func
,
oo
_
.
steady_state
(
k_inst
),
''
,
options_
.
solve_tolf
,
100
);
inst_val
=
csolve
(
nl_func
,
oo
.
steady_state
(
k_inst
),
''
,
options_
.
solve_tolf
,
100
);
else
[
inst_val
,
info1
]
=
dynare_solve
(
nl_func
,
ys
(
k_inst
),
0
);
end
ys
(
k_inst
)
=
inst_val
;
[
x
,
params
,
check
]
=
evaluate_steadystate_file
(
ys
,
exo_ss
,
params
,
M
.
fname
,
options_
.
steadystate_flag
);
exo_ss
=
[
oo
.
exo_steady_state
oo
.
exo_det_steady_state
];
[
x
,
params
,
check
]
=
evaluate_steady_state_file
(
ys
,
exo_ss
,
params
,
...
M
.
fname
,
options_
.
steadystate_flag
);
if
size
(
x
,
1
)
<
M
.
endo_nbr
if
length
(
M
.
aux_vars
)
>
0
x
=
feval
([
M
.
fname
'_set_auxiliary_variables'
],
xx
,
...
[
oo
.
exo_steady_state
,
...
oo
.
exo_det_steady_state
],
...
M
.
params
);
else
error
([
M
.
fname
'_steadystate.m doesn
''
t match the model'
]);
end
end
[
junk
,
junk
,
multbar
]
=
dyn_ramsey_static_1
(
x
(
k_inst
),
M
,
options_
,
oo
_
);
[
junk
,
junk
,
multbar
]
=
dyn_ramsey_static_1
(
x
(
k_inst
),
M
,
options_
,
oo
);
steady_state
=
[
x
(
1
:
M
.
orig_endo_nbr
);
multbar
];
else
xx
=
oo
.
steady_state
(
1
:
M
.
orig_endo_nbr
);
...
...
@@ -106,10 +106,11 @@ if options_.steadystate_flag
M
.
endo_names
,
'exact'
)];
end
oo
.
steady_state
(
k_inst
)
=
x
;
[
x
,
check
]
=
feval
([
M
.
fname
'_steadystate'
],
...
oo
.
steady_state
,
...
[
oo
.
exo_steady_state
;
...
oo
.
exo_det_steady_state
]);
[
x
,
params
,
check
]
=
evaluate_steady_state_file
(
oo
.
steady_state
,
...
[
oo
.
exo_steady_state
;
...
oo
.
exo_det_steady_state
]
...
,
M
.
params
,
M
.
fname
,
...
options_
.
steadystate_flag
);
end
% setting steady state of auxiliary variables
...
...
preprocessor/SteadyStateModel.cc
View file @
e1856be5
...
...
@@ -116,8 +116,7 @@ SteadyStateModel::writeSteadyStateFile(const string &basename, bool ramsey_polic
output
<<
"function [ys_, params, info] = "
<<
basename
<<
"_steadystate2("
<<
"ys_, exo_, params)"
<<
endl
<<
"% Steady state generated by Dynare preprocessor"
<<
endl
<<
" info = 0;"
<<
endl
<<
" ys_ = zeros("
<<
symbol_table
.
endo_nbr
()
<<
",1);"
<<
endl
;
<<
" info = 0;"
<<
endl
;
for
(
size_t
i
=
0
;
i
<
recursive_order
.
size
();
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment