small fix to implementation of second derivatives of jacobian w.r.t. parameters
parent
19c4f7426c
commit
b291f4fcf7
|
@ -2707,6 +2707,7 @@ DynamicModel::writeParamsDerivativesFile(const string &basename) const
|
||||||
{
|
{
|
||||||
if (!residuals_params_derivatives.size()
|
if (!residuals_params_derivatives.size()
|
||||||
&& !jacobian_params_derivatives.size()
|
&& !jacobian_params_derivatives.size()
|
||||||
|
&& !jacobian_params_second_derivatives.size()
|
||||||
&& !hessian_params_derivatives.size())
|
&& !hessian_params_derivatives.size())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2719,7 +2720,7 @@ DynamicModel::writeParamsDerivativesFile(const string &basename) const
|
||||||
cerr << "ERROR: Can't open file " << filename << " for writing" << endl;
|
cerr << "ERROR: Can't open file " << filename << " for writing" << endl;
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
paramsDerivsFile << "function [rp, gp] = " << basename << "_params_derivs(y, x, params, it_)" << endl
|
paramsDerivsFile << "function [rp, gp, gpp, hp] = " << basename << "_params_derivs(y, x, params, it_)" << endl
|
||||||
<< "%" << endl
|
<< "%" << endl
|
||||||
<< "% Warning : this file is generated automatically by Dynare" << endl
|
<< "% Warning : this file is generated automatically by Dynare" << endl
|
||||||
<< "% from model file (.mod)" << endl << endl;
|
<< "% from model file (.mod)" << endl << endl;
|
||||||
|
|
Loading…
Reference in New Issue