Commit b65bb7e2 authored by MichelJuillard's avatar MichelJuillard
Browse files

MS-SBVAR: added automatic saving of graphs in <mod_name>/Output; added...

MS-SBVAR: added automatic saving of graphs in <mod_name>/Output; added possibility to select endogenous variables for IRF plots; updated plot functions.
parent 007b37f1
......@@ -993,7 +993,9 @@ MSSBVARComputeProbabilitiesStatement::writeOutput(ostream &output, const string
output << "[options_, oo_] = ms_compute_probabilities(M_, options_, oo_);" << endl;
}
MSSBVARIrfStatement::MSSBVARIrfStatement(const OptionsList &options_list_arg) :
MSSBVARIrfStatement::MSSBVARIrfStatement(const SymbolList &symbol_list_arg,
const OptionsList &options_list_arg) :
symbol_list(symbol_list_arg),
options_list(options_list_arg)
{
}
......@@ -1007,8 +1009,9 @@ MSSBVARIrfStatement::checkPass(ModFileStructure &mod_file_struct)
void
MSSBVARIrfStatement::writeOutput(ostream &output, const string &basename) const
{
symbol_list.writeOutput("var_list_", output);
options_list.writeOutput(output);
output << "[options_, oo_] = ms_irf(M_, options_, oo_);" << endl;
output << "[options_, oo_] = ms_irf(var_list_,M_, options_, oo_);" << endl;
}
MSSBVARForecastStatement::MSSBVARForecastStatement(const OptionsList &options_list_arg) :
......
......@@ -421,9 +421,11 @@ public:
class MSSBVARIrfStatement : public Statement
{
private:
const SymbolList symbol_list;
const OptionsList options_list;
public:
MSSBVARIrfStatement(const OptionsList &options_list_arg);
MSSBVARIrfStatement(const SymbolList &symbol_list_arg,
const OptionsList &options_list_arg);
virtual void checkPass(ModFileStructure &mod_file_struct);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......
......@@ -1543,6 +1543,10 @@ ms_irf : MS_IRF ';'
{ driver.ms_irf(); }
| MS_IRF '(' ms_irf_options_list ')' ';'
{ driver.ms_irf(); }
MS_IRF symbol_list';'
{ driver.ms_irf(); }
| MS_IRF '(' ms_irf_options_list ')' symbol_list ';'
{ driver.ms_irf(); }
;
ms_compute_probabilities_option : o_output_file_tag
......
......@@ -1344,7 +1344,8 @@ ParsingDriver::ms_compute_probabilities()
void
ParsingDriver::ms_irf()
{
mod_file->addStatement(new MSSBVARIrfStatement(options_list));
mod_file->addStatement(new MSSBVARIrfStatement(symbol_list,options_list));
symbol_list.clear();
options_list.clear();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment