Merge branch 'master' into julia

issue#70
Houtan Bastani 2015-07-29 14:53:35 +02:00
commit 54874efa72
3 changed files with 13 additions and 18 deletions

View File

@ -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>

View File

@ -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)

View File

@ -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++)