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

:bug: Fix linearity check for Ramsey models with lead/lag>1 on endos or >0 on exos

Ref. dynare#1960

(manually cherry picked from commit 7a758f67)
parent 55c110e1
Branches
No related tags found
No related merge requests found
Pipeline #11563 passed
/*
* Copyright © 2010-2023 Dynare Team
* Copyright © 2010-2025 Dynare Team
*
* This file is part of Dynare.
*
......@@ -58,6 +58,17 @@ protected:
{
return "original Ramsey model";
}
int
getJacobianCol(int deriv_id, [[maybe_unused]] bool sparse) const override
{
/* Override the DynamicModel method by returning a dummy Jacobian column number.
The override is necessary because the method from DynamicModel fails with
endos with lag/lead greater than 1 or exos with a lag/lead, while substitutions
are by definition not done for an original model.
In particular, this fixes dynare#1960 (equation derivatives are computed for models declared
as linear, to check whether they are truly linear). */
return deriv_id;
}
};
class SteadyStateModel : public DataTree
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment