- Correction of temporary terms when bytecode is used and solve_algo <= 4
parent
905036844b
commit
6f184371ef
|
@ -20,8 +20,7 @@ function [r, g1] = block_bytecode_mfs_steadystate(y, b, y_all)
|
|||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
global M_ oo_
|
||||
global temporary_terms;
|
||||
indx = M_.blocksMFS{b};
|
||||
y_all(indx) = y;
|
||||
x = [oo_.exo_steady_state; oo_.exo_det_steady_state];
|
||||
eval(['[chk, r, g1, nulldev, temporary_terms] = bytecode( y_all, x, M_.params, 1, y_all, temporary_terms, ''evaluate'', ''static'', ''block = ' int2str(b) ''', ''global_temporary_terms'');']);
|
||||
[chk, r, g1] = bytecode( y_all, x, M_.params, 1, y_all, 'evaluate', 'static', ['block = ' int2str(b) ]);
|
||||
|
|
|
@ -59,7 +59,7 @@ elseif options_.bytecode
|
|||
end
|
||||
x(M_.blocksMFS{b}) = y;
|
||||
else
|
||||
[check, x] = feval('bytecode', x, exo, params, 'static', ['block = ' int2str(b)]);
|
||||
[chk, nulldev, nulldev1, x] = bytecode( x, exo, params, 1, x, 'evaluate', 'static', ['block = ' int2str(b)]);
|
||||
end;
|
||||
end
|
||||
else
|
||||
|
|
|
@ -2546,9 +2546,9 @@ Interpreter::compute_blocks(string file_name, string bin_basename, bool steady_s
|
|||
#ifdef DEBUG
|
||||
mexPrintf("---------------------------------------------------------\n");
|
||||
if (block < 0)
|
||||
mexPrintf("FBEGINBLOCK %d\n", Block_Count+1);
|
||||
mexPrintf("FBEGINBLOCK Block_Count=%d\n", Block_Count+1);
|
||||
else
|
||||
mexPrintf("FBEGINBLOCK %d\n", block+1);
|
||||
mexPrintf("FBEGINBLOCK block=%d\n", block+1);
|
||||
#endif
|
||||
//it's a new block
|
||||
{
|
||||
|
|
|
@ -386,6 +386,8 @@ mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
|
|||
pind[i] = y[i];
|
||||
}
|
||||
if (nlhs > 2)
|
||||
{
|
||||
if (evaluate)
|
||||
{
|
||||
int jacob_field_number = 0, jacob_exo_field_number = 0, jacob_exo_det_field_number = 0, jacob_other_endo_field_number = 0;
|
||||
if (!block_structur)
|
||||
|
@ -430,6 +432,13 @@ mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
|
|||
mxSetFieldByNumber(plhs[2],i,jacob_other_endo_field_number,interprete.get_jacob_other_endo(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
plhs[2] = mxCreateDoubleMatrix(1, 1, mxREAL);
|
||||
pind = mxGetPr(plhs[0]);
|
||||
pind[0] = NAN;
|
||||
}
|
||||
if (nlhs > 3)
|
||||
{
|
||||
plhs[3] = mxCreateDoubleMatrix(row_y, col_y, mxREAL);
|
||||
|
|
Loading…
Reference in New Issue