preprocessor: always write M_.state_var #637
parent
f42d833705
commit
c4ef3575f2
|
@ -2603,10 +2603,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
|
||||||
(julia ? "false" : "0"))
|
(julia ? "false" : "0"))
|
||||||
<< ";" << endl;
|
<< ";" << endl;
|
||||||
|
|
||||||
//In case of sparse model, writes the block_decomposition structure of the model
|
vector<int> state_var;
|
||||||
if (block_decomposition)
|
|
||||||
{
|
|
||||||
vector<int> state_var, state_equ;
|
|
||||||
for (int endoID = 0; endoID < symbol_table.endo_nbr(); endoID++)
|
for (int endoID = 0; endoID < symbol_table.endo_nbr(); endoID++)
|
||||||
// Loop on periods
|
// Loop on periods
|
||||||
for (int lag = -max_endo_lag; lag < 0; lag++)
|
for (int lag = -max_endo_lag; lag < 0; lag++)
|
||||||
|
@ -2620,6 +2617,10 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//In case of sparse model, writes the block_decomposition structure of the model
|
||||||
|
if (block_decomposition)
|
||||||
|
{
|
||||||
|
vector<int> state_equ;
|
||||||
int count_lead_lag_incidence = 0;
|
int count_lead_lag_incidence = 0;
|
||||||
int max_lead, max_lag, max_lag_endo, max_lead_endo, max_lag_exo, max_lead_exo, max_lag_exo_det, max_lead_exo_det;
|
int max_lead, max_lag, max_lag_endo, max_lead_endo, max_lag_exo, max_lead_exo, max_lag_exo_det, max_lead_exo_det;
|
||||||
unsigned int nb_blocks = getNbBlocks();
|
unsigned int nb_blocks = getNbBlocks();
|
||||||
|
@ -3039,12 +3040,12 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
|
||||||
KF_index_file.write(reinterpret_cast<char *>(&(*it)), sizeof(index_KF));
|
KF_index_file.write(reinterpret_cast<char *>(&(*it)), sizeof(index_KF));
|
||||||
KF_index_file.close();
|
KF_index_file.close();
|
||||||
}
|
}
|
||||||
output << modstruct << "state_var = [";
|
}
|
||||||
|
|
||||||
|
output << modstruct << "state_var = [";
|
||||||
for (vector<int>::const_iterator it=state_var.begin(); it != state_var.end(); it++)
|
for (vector<int>::const_iterator it=state_var.begin(); it != state_var.end(); it++)
|
||||||
output << *it << " ";
|
output << *it << " ";
|
||||||
output << "];" << endl;
|
output << "];" << endl;
|
||||||
}
|
|
||||||
|
|
||||||
// Writing initialization for some other variables
|
// Writing initialization for some other variables
|
||||||
if (!julia)
|
if (!julia)
|
||||||
|
|
Loading…
Reference in New Issue