Skip to content
Snippets Groups Projects
Verified Commit 7a758f67 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
parent 122cc63c
Branches
No related tags found
No related merge requests found
Pipeline #11560 passed
/* /*
* Copyright © 2010-2024 Dynare Team * Copyright © 2010-2025 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -62,6 +62,17 @@ protected: ...@@ -62,6 +62,17 @@ protected:
{ {
return "original Ramsey model"; 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 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