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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Stéphane Adjemian
dynare
Commits
f7cf75a2
Commit
f7cf75a2
authored
13 years ago
by
MichelJuillard
Browse files
Options
Downloads
Patches
Plain Diff
fixed problems with trying to make homotopy robust to problems in one run.
parent
ad377c6e
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
matlab/evaluate_steady_state.m
+2
-1
2 additions, 1 deletion
matlab/evaluate_steady_state.m
matlab/homotopy1.m
+8
-1
8 additions, 1 deletion
matlab/homotopy1.m
matlab/steady.m
+8
-4
8 additions, 4 deletions
matlab/steady.m
preprocessor/DynareBison.yy
+1
-1
1 addition, 1 deletion
preprocessor/DynareBison.yy
with
19 additions
and
7 deletions
matlab/evaluate_steady_state.m
+
2
−
1
View file @
f7cf75a2
...
@@ -81,7 +81,8 @@ function [ys,params,info] = evaluate_steady_state(ys_init,M,options,oo,steadysta
...
@@ -81,7 +81,8 @@ function [ys,params,info] = evaluate_steady_state(ys_init,M,options,oo,steadysta
end
end
else
else
% block or bytecode
% block or bytecode
[
ys
,
check
]
=
dynare_solve_block_or_bytecode
(
ys_init
,
exo_ss
,
params
,
options
,
M
);
[
ys
,
check
]
=
dynare_solve_block_or_bytecode
(
ys_init
,
exo_ss
,
params
,
...
options
,
M
);
end
end
if
check
if
check
...
...
This diff is collapsed.
Click to expand it.
matlab/homotopy1.m
+
8
−
1
View file @
f7cf75a2
...
@@ -77,5 +77,12 @@ for i=1:step_nbr+1
...
@@ -77,5 +77,12 @@ for i=1:step_nbr+1
oo_
.
exo_steady_state
(
values
(
ix
,
2
))
=
points
(
ix
,
i
);
oo_
.
exo_steady_state
(
values
(
ix
,
2
))
=
points
(
ix
,
i
);
oo_
.
exo_det_steady_state
(
values
(
ixd
,
2
))
=
points
(
ixd
,
i
);
oo_
.
exo_det_steady_state
(
values
(
ixd
,
2
))
=
points
(
ixd
,
i
);
oo_
.
steady_state
=
steady_
(
M_
,
options_
,
oo_
);
[
steady_state
,
M_
.
params
,
info
]
=
steady_
(
M_
,
options_
,
oo_
);
if
info
(
1
)
==
0
% if homotopy step is not successful, current values of steady
% state are not modified
oo_
.
steady_state
=
steady_state
;
else
break
end
end
end
This diff is collapsed.
Click to expand it.
matlab/steady.m
+
8
−
4
View file @
f7cf75a2
...
@@ -53,12 +53,16 @@ switch options_.homotopy_mode
...
@@ -53,12 +53,16 @@ switch options_.homotopy_mode
homotopy3
(
options_
.
homotopy_values
,
options_
.
homotopy_steps
);
homotopy3
(
options_
.
homotopy_values
,
options_
.
homotopy_steps
);
end
end
[
oo_
.
steady_state
,
M_
.
params
,
info
]
=
steady_
(
M_
,
options_
,
oo_
);
[
steady_state
,
M_
.
params
,
info
]
=
steady_
(
M_
,
options_
,
oo_
);
if
info
(
1
)
&&
options_
.
steady
.
stop_on_error
if
info
(
1
)
==
0
oo_
.
steady_state
=
steady_state
;
disp_steady_state
(
M_
,
oo_
);
elseif
options_
.
steady
.
stop_on_error
print_info
(
info
,
options_
.
noprint
);
print_info
(
info
,
options_
.
noprint
);
else
disp
([
'Warning: steady state could not be computed but steady.stop_on_error '
...
'== 0, so I continue'
])
end
end
disp_steady_state
(
M_
,
oo_
);
M_
.
Sigma_e
=
Sigma_e
;
M_
.
Sigma_e
=
Sigma_e
;
This diff is collapsed.
Click to expand it.
preprocessor/DynareBison.yy
+
1
−
1
View file @
f7cf75a2
...
@@ -2502,7 +2502,7 @@ o_median : MEDIAN { driver.option_num("ms.median","1"); }
...
@@ -2502,7 +2502,7 @@ o_median : MEDIAN { driver.option_num("ms.median","1"); }
o_regimes : REGIMES { driver.option_num("ms.regimes","1"); };
o_regimes : REGIMES { driver.option_num("ms.regimes","1"); };
o_regime : REGIME EQUAL INT_NUMBER { driver.option_num("ms.regime",$3); };
o_regime : REGIME EQUAL INT_NUMBER { driver.option_num("ms.regime",$3); };
o_data_obs_nbr : DATA_OBS_NBR EQUAL INT_NUMBER { driver.option_num("ms.forecast_data_obs",$3); };
o_data_obs_nbr : DATA_OBS_NBR EQUAL INT_NUMBER { driver.option_num("ms.forecast_data_obs",$3); };
o_stop_on_error: STOP_ON_ERROR EQUAL INT_NUMBER { driver.option_num("steady.stop_on_eror",$3); };
o_stop_on_error: STOP_ON_ERROR EQUAL INT_NUMBER { driver.option_num("steady.stop_on_er
r
or",$3); };
o_discretionary_tol: DISCRETIONARY_TOL EQUAL non_negative_number { driver.option_num("discretionary_tol",$3); };
o_discretionary_tol: DISCRETIONARY_TOL EQUAL non_negative_number { driver.option_num("discretionary_tol",$3); };
range : symbol ':' symbol
range : symbol ':' symbol
...
...
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