JSON output: fix “variable_mapping” for Ramsey models

Ref. dynare#1755
issue#70
Sébastien Villemot 2020-12-09 17:32:08 +01:00
parent bf1da3c6fb
commit f67e9c044b
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 1 deletions

View File

@ -608,7 +608,9 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, bool
} }
// And finally perform the substitutions // And finally perform the substitutions
dynamic_model.substituteVarExpectation(var_expectation_subst_table); dynamic_model.substituteVarExpectation(var_expectation_subst_table);
dynamic_model.createVariableMapping(original_model.equation_number()); dynamic_model.createVariableMapping(mod_file_struct.orig_eq_nbr +
(mod_file_struct.ramsey_model_present ?
mod_file_struct.ramsey_eq_nbr : 0));
/* Create auxiliary vars for leads and lags greater than 2, on both endos and /* Create auxiliary vars for leads and lags greater than 2, on both endos and
exos. The transformation is not exactly the same on stochastic and exos. The transformation is not exactly the same on stochastic and