Skip to content
Snippets Groups Projects
Verified Commit b50424b5 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Perfect foresight w/ expectation errors: improve error message for marginal linearization

In situations where the solution cannot be found for an informational period > 1
using the same completion share as for the first informational period, suggest
to decrease the value of the homotopy_max_completion_share option.

(cherry picked from commit 119f92fd)
parent 2daf4b6c
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,10 @@ while info_period <= periods ...@@ -89,7 +89,10 @@ while info_period <= periods
homotopy_completion_share = oo_.deterministic_simulation.homotopy_completion_share; homotopy_completion_share = oo_.deterministic_simulation.homotopy_completion_share;
options_.simul.homotopy_max_completion_share = homotopy_completion_share; options_.simul.homotopy_max_completion_share = homotopy_completion_share;
elseif oo_.deterministic_simulation.homotopy_completion_share ~= homotopy_completion_share elseif oo_.deterministic_simulation.homotopy_completion_share ~= homotopy_completion_share
error('perfect_foresight_solver_with_expectation_errors: could not find a solution for information available at period %d with the same homotopy completion share as period 1\n', info_period) %% NB: in the following message, we don’t use the %.3f formatter because it may round the
%% share to a greater number, which would lead to an incorrect suggestion
error('perfect_foresight_solver_with_expectation_errors: could not find a solution for information available at period %d with the same homotopy completion share as period 1; a possible solution is to retry the simulation with homotopy_max_completion_share=%s\n', ...
info_period, num2str(floor(oo_.deterministic_simulation.homotopy_completion_share*1000)/1000))
end end
endo_simul(:, info_period:end) = oo_.endo_simul; endo_simul(:, info_period:end) = oo_.endo_simul;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment