k_order mex: added derivatives as members of KorderpDynare
parent
57b7c0e94f
commit
287b134884
|
@ -89,10 +89,8 @@ KordpDynare::evaluateSystem(Vector &out, const Vector &yym, const Vector &yy,
|
||||||
void
|
void
|
||||||
KordpDynare::calcDerivativesAtSteady() throw (DynareException)
|
KordpDynare::calcDerivativesAtSteady() throw (DynareException)
|
||||||
{
|
{
|
||||||
TwoDMatrix g1(nY, nJcols);
|
g1p = new TwoDMatrix(nY, nJcols);
|
||||||
g1.zeros();
|
g1p->zeros();
|
||||||
|
|
||||||
TwoDMatrix *g2p = NULL, *g3p = NULL;
|
|
||||||
|
|
||||||
if (nOrder > 1)
|
if (nOrder > 1)
|
||||||
{
|
{
|
||||||
|
@ -115,9 +113,10 @@ KordpDynare::calcDerivativesAtSteady() throw (DynareException)
|
||||||
Vector llxSteady(nJcols-nExog);
|
Vector llxSteady(nJcols-nExog);
|
||||||
LLxSteady(ySteady, llxSteady);
|
LLxSteady(ySteady, llxSteady);
|
||||||
|
|
||||||
dynamicModelFile->eval(llxSteady, xx, params, ySteady, out, &g1, g2p, g3p);
|
dynamicModelFile->eval(llxSteady, xx, params, ySteady, out, g1p, g2p, g3p);
|
||||||
|
|
||||||
populateDerivativesContainer(g1, 1, JacobianIndices);
|
populateDerivativesContainer(*g1p, 1, JacobianIndices);
|
||||||
|
delete g1p;
|
||||||
|
|
||||||
if (nOrder > 1)
|
if (nOrder > 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -113,6 +113,10 @@ class KordpDynare : public DynamicModel
|
||||||
const TwoDMatrix &ll_Incidence;
|
const TwoDMatrix &ll_Incidence;
|
||||||
double qz_criterium;
|
double qz_criterium;
|
||||||
vector<int> JacobianIndices;
|
vector<int> JacobianIndices;
|
||||||
|
|
||||||
|
TwoDMatrix *g1p;
|
||||||
|
TwoDMatrix *g2p;
|
||||||
|
TwoDMatrix *g3p;
|
||||||
public:
|
public:
|
||||||
KordpDynare(const vector<string> &endo, int num_endo,
|
KordpDynare(const vector<string> &endo, int num_endo,
|
||||||
const vector<string> &exo, int num_exo, int num_par,
|
const vector<string> &exo, int num_exo, int num_par,
|
||||||
|
|
Loading…
Reference in New Issue