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

:bug: Homotopy for extended path (order 0) was utterly broken

The convergence test was wrong.

(manually cherry picked from commit 6ed90b3d)
parent 0f8fb4ee
Branches
Tags
No related merge requests found
Pipeline #8567 passed
function [info_convergence, endo_simul] = extended_path_homotopy(endo_simul, exo_simul, M, options, oo, pfm, ep, order, algo, method, debug)
% Copyright (C) 2016-2017 Dynare Team
% Copyright © 2016-2023 Dynare Team
%
% This file is part of Dynare.
%
......@@ -48,7 +48,7 @@ if ismember(method, [1, 2])
end
if isequal(order, 0)
% Logical variable flag is false iff the solver fails.
flag = ~tmp.deterministic_simulation.status;
flag = tmp.deterministic_simulation.status;
else
% Fix convention issue on the value of flag.
flag = ~flag;
......@@ -115,7 +115,7 @@ if isequal(method, 3) || (isequal(method, 2) && noconvergence)
end
if isequal(order, 0)
% Logical variable flag is false iff the solver fails.
flag = ~tmp.deterministic_simulation.status;
flag = tmp.deterministic_simulation.status;
else
% Fix convention issue on the value of flag.
flag = ~flag;
......@@ -136,4 +136,4 @@ if isequal(method, 3) || (isequal(method, 2) && noconvergence)
end
end
info_convergence = ~noconvergence;
end
\ No newline at end of file
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment