diff --git a/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_solver.m b/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_solver.m index a7b63bfd5ae61741a9fddedc6e6d1a3aee1ff5c1..96cbee6b6f1c75d49c07c84d55ffe70f03e1d18f 100644 --- a/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_solver.m +++ b/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_solver.m @@ -89,7 +89,10 @@ while info_period <= periods homotopy_completion_share = oo_.deterministic_simulation.homotopy_completion_share; options_.simul.homotopy_max_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 endo_simul(:, info_period:end) = oo_.endo_simul;