Discuss treatment of options_.qz_criterium and adjust k_order_pert accordingly
By default, we set
options_.qz_criterium = [];
What is the purpose of this?
stoch_simul
locally sets
if isempty(options_.qz_criterium)
options_.qz_criterium = 1+1e-6;
end
but never returns this value in options. Thus, calling resol
with k_order_solver
outside of stoch_simul
results in a crash with
dynare:k_order_perturbation: Caught Kord exception: NaN or Inf asserted in first order derivatives in FirstOrder::solve
because the field is empty.
Why don't we initialize the field by default to a non-empty value or at least check in k_order_perturbation
or k_order_pert
whether it is set instead of providing a wrong error message?