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

:bug: Perfect foresight with controlled paths: no longer crash with...

:bug: Perfect foresight with controlled paths: no longer crash with homotopy_exclude_varexo option and multiple controlled variables
parent e0c50200
No related branches found
No related tags found
No related merge requests found
Pipeline #11576 passed
...@@ -567,7 +567,7 @@ if ~isempty(controlled_paths_by_period) ...@@ -567,7 +567,7 @@ if ~isempty(controlled_paths_by_period)
% Handle guess values for endogenized exos % Handle guess values for endogenized exos
exo_ids = controlled_paths_by_period(p).endogenize_id; exo_ids = controlled_paths_by_period(p).endogenize_id;
if ~isempty(options_.simul.homotopy_exclude_varexo) if ~isempty(options_.simul.homotopy_exclude_varexo)
[is_excluded, excluded_exo_ids] = ismember(options_.simul.homotopy_exclude_varexo, M_.exo_names{exo_ids}); [is_excluded, excluded_exo_ids] = ismember(options_.simul.homotopy_exclude_varexo, M_.exo_names(exo_ids));
if any(is_excluded) if any(is_excluded)
error('Exogenous %s cannot be in the homotopy_exclude_varexo option and a perfect_foresight_controlled_paths block at the same time', M_.exo_names{excluded_exo_ids(1)}) error('Exogenous %s cannot be in the homotopy_exclude_varexo option and a perfect_foresight_controlled_paths block at the same time', M_.exo_names{excluded_exo_ids(1)})
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment