From fe142b663ef34d26969191d2a096b08aecc1eb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Tue, 6 Jun 2023 17:26:07 +0200 Subject: [PATCH] Perfect foresight: allow homotopy for purely backward/forward/static models This was previously disabled, but the code seems to work. --- .../perfect_foresight_solver.m | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/matlab/perfect-foresight-models/perfect_foresight_solver.m b/matlab/perfect-foresight-models/perfect_foresight_solver.m index b9a321924d..b15135af2c 100644 --- a/matlab/perfect-foresight-models/perfect_foresight_solver.m +++ b/matlab/perfect-foresight-models/perfect_foresight_solver.m @@ -64,30 +64,6 @@ if ~oo_.deterministic_simulation.status && ~options_.no_homotopy fprintf('Switching to a homotopy method...\n') end - if ~M_.maximum_lag && M_.maximum_lead>0 - disp('Homotopy not implemented for purely forward models!') - disp('Failed to solve the model!') - disp('Return with empty oo_.endo_simul.') - oo_.endo_simul = []; - return - end - - if ~M_.maximum_lead && M_.maximum_lag>0 - disp('Homotopy not implemented for purely backward models!') - disp('Failed to solve the model!') - disp('Return with empty oo_.endo_simul.') - oo_.endo_simul = []; - return - end - - if ~M_.maximum_lead && ~M_.maximum_lag - disp('Homotopy not implemented for purely static models!') - disp('Failed to solve the model!') - disp('Return with empty oo_.endo_simul.') - oo_.endo_simul = []; - return - end - % Disable warnings if homotopy warning_old_state = warning; warning off all -- GitLab