diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc index 0aa27b6dc..2954c0238 100644 --- a/preprocessor/ComputingTasks.cc +++ b/preprocessor/ComputingTasks.cc @@ -73,8 +73,8 @@ void ModelInfoStatement::writeOutput(ostream &output, const string &basename) co } -SimulStatement::SimulStatement(const OptionsList &options_list_arg) : - options_list(options_list_arg) +SimulStatement::SimulStatement(const OptionsList &options_list_arg, ModelTreeMode mode_arg) : + options_list(options_list_arg), mode(mode_arg) { } @@ -88,48 +88,32 @@ void SimulStatement::writeOutput(ostream &output, const string &basename) const { options_list.writeOutput(output); - output << "simul(oo_.dr);\n"; -} - -SimulSparseStatement::SimulSparseStatement(const OptionsList &options_list_arg, - int mode_arg) : - options_list(options_list_arg), - mode(mode_arg) -{ -} - -void -SimulSparseStatement::checkPass(ModFileStructure &mod_file_struct) -{ - mod_file_struct.simul_present = true; -} - -void -SimulSparseStatement::writeOutput(ostream &output, const string &basename) const -{ - options_list.writeOutput(output); - output << "if (~ options_.initval_file) & (size(oo_.endo_simul,2)addStatement(new StochSimulStatement(symbol_list, options_list)); + mod_file->addStatement(new StochSimulStatement(symbol_list, options_list, mod_file->dynamic_model.mode)); symbol_list.clear(); options_list.clear(); } -void ParsingDriver::simulate() -{ - if (mod_file->dynamic_model.mode == eSparseDLLMode || mod_file->dynamic_model.mode == eSparseMode) - simul_sparse(); - else - simul(); -} - -void -ParsingDriver::simul_sparse() -{ - mod_file->addStatement(new SimulSparseStatement(options_list, mod_file->dynamic_model.mode)); - options_list.clear(); -} - void ParsingDriver::simul() { - mod_file->addStatement(new SimulStatement(options_list)); + mod_file->addStatement(new SimulStatement(options_list, mod_file->dynamic_model.mode)); options_list.clear(); } - void ParsingDriver::model_info() { @@ -711,7 +695,6 @@ ParsingDriver::model_info() options_list.clear(); } - void ParsingDriver::check() { diff --git a/preprocessor/ParsingDriver.hh b/preprocessor/ParsingDriver.hh index 9976a4631..1f3864d13 100644 --- a/preprocessor/ParsingDriver.hh +++ b/preprocessor/ParsingDriver.hh @@ -282,10 +282,6 @@ public: void rplot(); //! Writes a stock_simul command void stoch_simul(); - //! Determine whether to write simul command or simul_sparse command - void simulate(); - //! Writes a simul_sparse command - void simul_sparse(); //! Writes a simul command void simul(); //! Writes check command