Merge branch 'master' into julia
commit
54874efa72
|
@ -2929,20 +2929,17 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
|
|||
|
||||
// Write number of non-zero derivatives
|
||||
// Use -1 if the derivatives have not been computed
|
||||
output << "M_.NNZDerivatives = zeros(3, 1);" << endl
|
||||
<< "M_.NNZDerivatives(1) = " << NNZDerivatives[0] << ";" << endl;
|
||||
output << "M_.NNZDerivatives = [" << NNZDerivatives[0] << "; ";
|
||||
if (order > 1)
|
||||
{
|
||||
output << "M_.NNZDerivatives(2) = " << NNZDerivatives[1] << ";" << endl;
|
||||
if (order > 2)
|
||||
output << "M_.NNZDerivatives(3) = " << NNZDerivatives[2] << ";" << endl;
|
||||
else
|
||||
output << "M_.NNZDerivatives(3) = -1;" << endl;
|
||||
}
|
||||
output << NNZDerivatives[1] << "; ";
|
||||
else
|
||||
output << "M_.NNZDerivatives(2) = -1;" << endl
|
||||
<< "M_.NNZDerivatives(3) = -1;" << endl;
|
||||
output << "-1; ";
|
||||
|
||||
if (order > 2)
|
||||
output << NNZDerivatives[2];
|
||||
else
|
||||
output << "-1";
|
||||
output << "];" << endl;
|
||||
}
|
||||
|
||||
map<pair<int, pair<int, int > >, expr_t>
|
||||
|
|
|
@ -274,7 +274,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename, bool mini
|
|||
output << "%" << endl
|
||||
<< "% HISTVAL instructions" << endl
|
||||
<< "%" << endl
|
||||
<< "M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_endo_lag);" << endl;
|
||||
<< "M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_lag);" << endl;
|
||||
|
||||
for (hist_values_t::const_iterator it = hist_values.begin();
|
||||
it != hist_values.end(); it++)
|
||||
|
@ -310,7 +310,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename, bool mini
|
|||
int tsid = symbol_table.getTypeSpecificID(symb_id) + 1;
|
||||
|
||||
if (type == eEndogenous)
|
||||
output << "M_.endo_histval( " << tsid << ", M_.maximum_endo_lag + " << lag << ") = ";
|
||||
output << "M_.endo_histval( " << tsid << ", M_.maximum_lag + " << lag << ") = ";
|
||||
else if (type == eExogenous)
|
||||
output << "oo_.exo_simul( M_.maximum_lag + " << lag << ", " << tsid << " ) = ";
|
||||
else if (type != eExogenousDet)
|
||||
|
|
|
@ -282,11 +282,9 @@ SymbolTable::writeOutput(ostream &output) const throw (NotYetFrozenException)
|
|||
int ic = 1;
|
||||
output << "options_.varobs = cell(1);" << endl;
|
||||
for (vector<int>::const_iterator it = varobs.begin();
|
||||
it != varobs.end(); it++)
|
||||
{
|
||||
output << "options_.varobs(" << ic << ") = {'" << getName(*it) << "'};" << endl;
|
||||
ic++;
|
||||
}
|
||||
it != varobs.end(); it++, ic++)
|
||||
output << "options_.varobs(" << ic << ") = {'" << getName(*it) << "'};" << endl;
|
||||
|
||||
output << "options_.varobs_id = [ ";
|
||||
for (vector<int>::const_iterator it = varobs.begin();
|
||||
it != varobs.end(); it++)
|
||||
|
|
Loading…
Reference in New Issue