Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
f336a68e
Commit
f336a68e
authored
Oct 22, 2010
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
Update tests for values of solve_algo and stack_solve_algo
parent
a2367e9e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/simul.m
+16
-14
16 additions, 14 deletions
matlab/simul.m
matlab/steady_.m
+12
-7
12 additions, 7 deletions
matlab/steady_.m
with
28 additions
and
21 deletions
matlab/simul.m
+
16
−
14
View file @
f336a68e
...
@@ -31,6 +31,22 @@ function simul
...
@@ -31,6 +31,22 @@ function simul
global
M_
options_
oo_
global
M_
options_
oo_
if
options_
.
stack_solve_algo
<
0
||
options_
.
stack_solve_algo
>
5
error
(
'SIMUL: stack_solve_algo must be between 0 and 5'
)
end
if
~
options_
.
block
&&
~
options_
.
bytecode
&&
options_
.
stack_solve_algo
~=
0
error
(
'SIMUL: you must use stack_solve_algo=0 when not using block nor bytecode option'
)
end
if
options_
.
block
&&
~
options_
.
bytecode
&&
options_
.
stack_solve_algo
==
5
error
(
'SIMUL: you can
''
t use stack_solve_algo = 5 without bytecode option'
)
end
if
exist
(
'OCTAVE_VERSION'
)
&&
options_
.
stack_solve_algo
==
2
error
(
'SIMUL: you can
''
t use stack_solve_algo = 2 under Octave'
)
end
if
size
(
M_
.
lead_lag_incidence
,
2
)
-
nnz
(
M_
.
lead_lag_incidence
(
M_
.
maximum_endo_lag
+
1
,:))
>
0
if
size
(
M_
.
lead_lag_incidence
,
2
)
-
nnz
(
M_
.
lead_lag_incidence
(
M_
.
maximum_endo_lag
+
1
,:))
>
0
mess
=
[
'SIMUL: error in model specification : variable '
M_
.
endo_names
(
find
(
M_
.
lead_lag_incidence
(
M_
.
maximum_lag
+
1
,:)
==
0
),:)]
;
mess
=
[
'SIMUL: error in model specification : variable '
M_
.
endo_names
(
find
(
M_
.
lead_lag_incidence
(
M_
.
maximum_lag
+
1
,:)
==
0
),:)]
;
mess
=
[
mess
' doesn
''
t appear as current variable.'
]
;
mess
=
[
mess
' doesn
''
t appear as current variable.'
]
;
...
@@ -57,20 +73,6 @@ end
...
@@ -57,20 +73,6 @@ end
options_
.
scalv
=
1
;
options_
.
scalv
=
1
;
if
~
options_
.
block
&&
~
options_
.
bytecode
&&
options_
.
stack_solve_algo
~=
0
error
(
'SIMUL: for the moment, you must use stack_solve_algo=0 when not using block nor bytecode option'
)
end
if
options_
.
block
&&
~
options_
.
bytecode
&&
(
options_
.
stack_solve_algo
==
5
)
error
(
'SIMUL: for the moment, you must use stack_solve_algo={1,2,3,4} when using block without bytecode option'
)
end
if
options_
.
bytecode
&&
(
options_
.
stack_solve_algo
~=
0
&&
options_
.
stack_solve_algo
~=
1
&&
options_
.
stack_solve_algo
~=
2
&&
options_
.
stack_solve_algo
~=
3
&&
options_
.
stack_solve_algo
~=
4
&&
options_
.
stack_solve_algo
~=
5
)
error
(
'SIMUL: for the moment, you must use stack_solve_algo= 1, 2, 3, 4 or 5 with bytecode option'
)
end
if
exist
(
'OCTAVE_VERSION'
)
&&
options_
.
stack_solve_algo
==
2
error
(
'SIMUL: stack_solve_algo=2 is not available for Octave. Choose another value.'
)
end
if
(
options_
.
block
)
if
(
options_
.
block
)
if
(
options_
.
bytecode
)
if
(
options_
.
bytecode
)
[
info
,
oo_
.
endo_simul
]
=
bytecode
(
'dynamic'
);
[
info
,
oo_
.
endo_simul
]
=
bytecode
(
'dynamic'
);
...
...
This diff is collapsed.
Click to expand it.
matlab/steady_.m
+
12
−
7
View file @
f336a68e
...
@@ -11,7 +11,7 @@ function steady_()
...
@@ -11,7 +11,7 @@ function steady_()
% SPECIAL REQUIREMENTS
% SPECIAL REQUIREMENTS
% none
% none
% Copyright (C) 2001-200
9
Dynare Team
% Copyright (C) 2001-20
1
0 Dynare Team
%
%
% This file is part of Dynare.
% This file is part of Dynare.
%
%
...
@@ -27,14 +27,19 @@ function steady_()
...
@@ -27,14 +27,19 @@ function steady_()
%
%
% You should have received a copy of the GNU General Public License
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global
M_
oo_
it_
options_
if
options_
.
bytecode
&&
...
global
M_
oo_
options_
(
options_
.
solve_algo
<
0
||
options_
.
solve_algo
>
8
)
error
(
'STEADY: for the moment, you must use solve_algo=1, 2, 3, 4, 5, 6, 7, 8 with bytecode option'
)
if
options_
.
solve_algo
<
0
||
options_
.
solve_algo
>
8
error
(
'STEADY: solve_algo must be between 0 and 8'
)
end
if
~
options_
.
bytecode
&&
~
options_
.
block
&&
options_
.
solve_algo
>
4
error
(
'STEADY: you can
''
t use solve_algo > 4 without block nor bytecode options'
)
end
end
if
~
options_
.
bytecode
&&
options_
.
solve_algo
==
8
error
(
'STEADY: you can
''
t yet use solve_algo=8 without bytecode option'
)
if
~
options_
.
bytecode
&&
options_
.
block
&&
options_
.
solve_algo
==
5
error
(
'STEADY: you can
''
t use solve_algo = 5 without bytecode option'
)
end
end
if
options_
.
steadystate_flag
if
options_
.
steadystate_flag
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment