Updated for passing qz_criterium and unit root models
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2415 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
ba080ab910
commit
9ee2a23a5d
|
@ -114,14 +114,14 @@ extern "C" {
|
||||||
double qz_criterium = 1+1e-6;
|
double qz_criterium = 1+1e-6;
|
||||||
mxFldp = mxGetField(options_, 0,"qz_criterium" );
|
mxFldp = mxGetField(options_, 0,"qz_criterium" );
|
||||||
if (mxIsNumeric(mxFldp))
|
if (mxIsNumeric(mxFldp))
|
||||||
qz_criterium = (int)mxGetScalar(mxFldp);
|
qz_criterium = (double)mxGetScalar(mxFldp);
|
||||||
|
|
||||||
mxFldp = mxGetField(M_, 0,"params" );
|
mxFldp = mxGetField(M_, 0,"params" );
|
||||||
double * dparams = (double *) mxGetData(mxFldp);
|
double * dparams = (double *) mxGetData(mxFldp);
|
||||||
int npar = (int)mxGetM(mxFldp);
|
int npar = (int)mxGetM(mxFldp);
|
||||||
Vector * modParams = new Vector(dparams, npar);
|
Vector * modParams = new Vector(dparams, npar);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
mexPrintf("k_ord_perturbation: nParams=%d .\n",npar);
|
mexPrintf("k_ord_perturbation: qz_criterium=%g, nParams=%d .\n",qz_criterium,npar);
|
||||||
for (int i = 0; i < npar; i++) {
|
for (int i = 0; i < npar; i++) {
|
||||||
mexPrintf("k_ord_perturbation: Params[%d]= %g.\n", i, (*modParams)[i]); }
|
mexPrintf("k_ord_perturbation: Params[%d]= %g.\n", i, (*modParams)[i]); }
|
||||||
#endif
|
#endif
|
||||||
|
@ -271,7 +271,7 @@ extern "C" {
|
||||||
// DynamicFn * pDynamicFn = loadModelDynamicDLL (fname);
|
// DynamicFn * pDynamicFn = loadModelDynamicDLL (fname);
|
||||||
DynamicModelDLL dynamicDLL(fName,nEndo, jcols, nMax_lag, nExog);
|
DynamicModelDLL dynamicDLL(fName,nEndo, jcols, nMax_lag, nExog);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
mexPrintf("k_order_perturbation: Calling dynare constructor.\n");
|
mexPrintf("k_order_perturbation: Calling dynare constructor .\n");
|
||||||
#endif
|
#endif
|
||||||
// make KordpDynare object
|
// make KordpDynare object
|
||||||
KordpDynare dynare(endoNamesMX, nEndo, exoNamesMX, nExog, nPar, // paramNames,
|
KordpDynare dynare(endoNamesMX, nEndo, exoNamesMX, nExog, nPar, // paramNames,
|
||||||
|
@ -299,9 +299,9 @@ extern "C" {
|
||||||
// construct main K-order approximation class
|
// construct main K-order approximation class
|
||||||
// FistOrderApproximation app(dynare, journal, nSteps);
|
// FistOrderApproximation app(dynare, journal, nSteps);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
mexPrintf("k_order_perturbation: Call Approximation constructor \n");
|
mexPrintf("k_order_perturbation: Call Approximation constructor with qz_criterium=%f \n", qz_criterium);
|
||||||
#endif
|
#endif
|
||||||
Approximation app(dynare, journal, nSteps);
|
Approximation app(dynare, journal, nSteps, false, qz_criterium);
|
||||||
// run stochastic steady
|
// run stochastic steady
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
mexPrintf("k_order_perturbation: Calling walkStochSteady.\n");
|
mexPrintf("k_order_perturbation: Calling walkStochSteady.\n");
|
||||||
|
|
Loading…
Reference in New Issue