Commit 01385d1f authored by Sébastien Villemot's avatar Sébastien Villemot

Simplify implementation of nopreprocessoroutput option

Simply redirect cout to /dev/null, instead of propagating a boolean
everywhere.
parent 5784dce1
Pipeline #513 passed with stage
in 1 minute and 26 seconds
......@@ -2167,7 +2167,7 @@ PlannerObjectiveStatement::getPlannerObjective() const
void
PlannerObjectiveStatement::computingPass()
{
model_tree.computingPass(3, 0, {}, false, false, false, false);
model_tree.computingPass(3, 0, {}, false, false, false);
computing_pass_called = true;
}
......
......@@ -4347,7 +4347,7 @@ DynamicModel::substitutePacExpectation()
void
DynamicModel::computingPass(bool jacobianExo, int derivsOrder, int paramsDerivsOrder,
const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool use_dll,
bool bytecode, bool nopreprocessoroutput, bool linear_decomposition)
bool bytecode, bool linear_decomposition)
{
assert(jacobianExo || (derivsOrder < 2 && paramsDerivsOrder == 0));
......@@ -4370,16 +4370,14 @@ DynamicModel::computingPass(bool jacobianExo, int derivsOrder, int paramsDerivsO
}
// Launch computations
if (!nopreprocessoroutput)
cout << "Computing " << (linear_decomposition ? "nonlinear " : "")
<< "dynamic model derivatives (order " << derivsOrder << ")." << endl;
cout << "Computing " << (linear_decomposition ? "nonlinear " : "")
<< "dynamic model derivatives (order " << derivsOrder << ")." << endl;
computeDerivatives(derivsOrder, vars);
if (paramsDerivsOrder > 0)
{
if (!nopreprocessoroutput)
cout << "Computing dynamic model derivatives w.r.t. parameters (order " << paramsDerivsOrder << ")." << endl;
cout << "Computing dynamic model derivatives w.r.t. parameters (order " << paramsDerivsOrder << ")." << endl;
computeParamsDerivatives(paramsDerivsOrder);
}
......@@ -4439,8 +4437,7 @@ DynamicModel::computingPass(bool jacobianExo, int derivsOrder, int paramsDerivsO
equation_type_and_normalized_equation = equationTypeDetermination(first_order_endo_derivatives, variable_reordered, equation_reordered, mfs);
if (!nopreprocessoroutput)
cout << "Finding the optimal block decomposition of the model ..." << endl;
cout << "Finding the optimal block decomposition of the model ..." << endl;
lag_lead_vector_t equation_lag_lead, variable_lag_lead;
......@@ -4958,7 +4955,7 @@ DynamicModel::replaceMyEquations(DynamicModel &dynamic_model) const
}
void
DynamicModel::computeRamseyPolicyFOCs(const StaticModel &static_model, const bool nopreprocessoroutput)
DynamicModel::computeRamseyPolicyFOCs(const StaticModel &static_model)
{
// Add aux LM to constraints in equations
// equation[i]->lhs = rhs becomes equation[i]->MULT_(i+1)*(lhs-rhs) = 0
......@@ -4969,8 +4966,7 @@ DynamicModel::computeRamseyPolicyFOCs(const StaticModel &static_model, const boo
assert(substeq != nullptr);
equations[i] = substeq;
}
if (!nopreprocessoroutput)
cout << "Ramsey Problem: added " << i << " Multipliers." << endl;
cout << "Ramsey Problem: added " << i << " Multipliers." << endl;
// Add Planner Objective to equations to include in computeDerivIDs
assert(static_model.equations.size() == 1);
......@@ -5641,31 +5637,31 @@ DynamicModel::writeLatexOriginalFile(const string &basename, const bool write_eq
}
void
DynamicModel::substituteEndoLeadGreaterThanTwo(bool deterministic_model, bool nopreprocessoroutput)
DynamicModel::substituteEndoLeadGreaterThanTwo(bool deterministic_model)
{
substituteLeadLagInternal(AuxVarType::endoLead, deterministic_model, {}, nopreprocessoroutput);
substituteLeadLagInternal(AuxVarType::endoLead, deterministic_model, {});
}
void
DynamicModel::substituteEndoLagGreaterThanTwo(bool deterministic_model, bool nopreprocessoroutput)
DynamicModel::substituteEndoLagGreaterThanTwo(bool deterministic_model)
{
substituteLeadLagInternal(AuxVarType::endoLag, deterministic_model, {}, nopreprocessoroutput);
substituteLeadLagInternal(AuxVarType::endoLag, deterministic_model, {});
}
void
DynamicModel::substituteExoLead(bool deterministic_model, bool nopreprocessoroutput)
DynamicModel::substituteExoLead(bool deterministic_model)
{
substituteLeadLagInternal(AuxVarType::exoLead, deterministic_model, {}, nopreprocessoroutput);
substituteLeadLagInternal(AuxVarType::exoLead, deterministic_model, {});
}
void
DynamicModel::substituteExoLag(bool deterministic_model, bool nopreprocessoroutput)
DynamicModel::substituteExoLag(bool deterministic_model)
{
substituteLeadLagInternal(AuxVarType::exoLag, deterministic_model, {}, nopreprocessoroutput);
substituteLeadLagInternal(AuxVarType::exoLag, deterministic_model, {});
}
void
DynamicModel::substituteLeadLagInternal(AuxVarType type, bool deterministic_model, const vector<string> &subset, bool nopreprocessoroutput)
DynamicModel::substituteLeadLagInternal(AuxVarType type, bool deterministic_model, const vector<string> &subset)
{
ExprNode::subst_table_t subst_table;
vector<BinaryOpNode *> neweqs;
......@@ -5743,7 +5739,7 @@ DynamicModel::substituteLeadLagInternal(AuxVarType type, bool deterministic_mode
// - lag variables from lower lag to higher lag
copy(neweqs.begin(), neweqs.end(), back_inserter(aux_equations));
if (!nopreprocessoroutput && neweqs.size() > 0)
if (neweqs.size() > 0)
{
cout << "Substitution of ";
switch (type)
......@@ -5808,24 +5804,24 @@ DynamicModel::findPacExpectationEquationNumbers(vector<int> &eqnumbers) const
}
void
DynamicModel::substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, bool nopreprocessoroutput)
DynamicModel::substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table)
{
vector<int> eqnumbers(equations.size());
iota(eqnumbers.begin(), eqnumbers.end(), 0);
substituteUnaryOps(static_model, nodes, subst_table, eqnumbers, nopreprocessoroutput);
substituteUnaryOps(static_model, nodes, subst_table, eqnumbers);
}
void
DynamicModel::substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, set<string> &var_model_eqtags, bool nopreprocessoroutput)
DynamicModel::substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, set<string> &var_model_eqtags)
{
vector<int> eqnumbers;
getEquationNumbersFromTags(eqnumbers, var_model_eqtags);
findPacExpectationEquationNumbers(eqnumbers);
substituteUnaryOps(static_model, nodes, subst_table, eqnumbers, nopreprocessoroutput);
substituteUnaryOps(static_model, nodes, subst_table, eqnumbers);
}
void
DynamicModel::substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, vector<int> &eqnumbers, bool nopreprocessoroutput)
DynamicModel::substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, vector<int> &eqnumbers)
{
// Find matching unary ops that may be outside of diffs (i.e., those with different lags)
set<int> used_local_vars;
......@@ -5860,12 +5856,12 @@ DynamicModel::substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes,
copy(neweqs.begin(), neweqs.end(), back_inserter(aux_equations));
if (!nopreprocessoroutput && subst_table.size() > 0)
if (subst_table.size() > 0)
cout << "Substitution of Unary Ops: added " << neweqs.size() << " auxiliary variables and equations." << endl;
}
void
DynamicModel::substituteDiff(StaticModel &static_model, diff_table_t &diff_table, ExprNode::subst_table_t &diff_subst_table, bool nopreprocessoroutput)
DynamicModel::substituteDiff(StaticModel &static_model, diff_table_t &diff_table, ExprNode::subst_table_t &diff_subst_table)
{
set<int> used_local_vars;
for (const auto & equation : equations)
......@@ -5922,12 +5918,12 @@ DynamicModel::substituteDiff(StaticModel &static_model, diff_table_t &diff_table
copy(neweqs.begin(), neweqs.end(), back_inserter(aux_equations));
if (!nopreprocessoroutput && diff_subst_table.size() > 0)
if (diff_subst_table.size() > 0)
cout << "Substitution of Diff operator: added " << neweqs.size() << " auxiliary variables and equations." << endl;
}
void
DynamicModel::substituteExpectation(bool partial_information_model, bool nopreprocessoroutput)
DynamicModel::substituteExpectation(bool partial_information_model)
{
ExprNode::subst_table_t subst_table;
vector<BinaryOpNode *> neweqs;
......@@ -5951,7 +5947,7 @@ DynamicModel::substituteExpectation(bool partial_information_model, bool noprepr
// Add the new set of equations at the *beginning* of aux_equations
copy(neweqs.rbegin(), neweqs.rend(), front_inserter(aux_equations));
if (!nopreprocessoroutput && subst_table.size() > 0)
if (subst_table.size() > 0)
{
if (partial_information_model)
cout << "Substitution of Expectation operator: added " << subst_table.size() << " auxiliary variables and " << neweqs.size() << " auxiliary equations." << endl;
......@@ -6007,9 +6003,9 @@ DynamicModel::removeTrendVariableFromEquations()
}
void
DynamicModel::differentiateForwardVars(const vector<string> &subset, bool nopreprocessoroutput)
DynamicModel::differentiateForwardVars(const vector<string> &subset)
{
substituteLeadLagInternal(AuxVarType::diffForward, true, subset, nopreprocessoroutput);
substituteLeadLagInternal(AuxVarType::diffForward, true, subset);
}
void
......
......@@ -180,7 +180,7 @@ private:
\param[in] deterministic_model whether we are in a deterministic model (only for exogenous leads/lags)
\param[in] subset variables to which to apply the transformation (only for diff of forward vars)
*/
void substituteLeadLagInternal(AuxVarType type, bool deterministic_model, const vector<string> &subset, bool nopreprocessoroutput);
void substituteLeadLagInternal(AuxVarType type, bool deterministic_model, const vector<string> &subset);
//! Indicate if the temporary terms are computed for the overall model (true) or not (false). Default value true
bool global_temporary_terms{true};
......@@ -287,7 +287,7 @@ public:
\param no_tmp_terms if true, no temporary terms will be computed in the dynamic files
*/
void computingPass(bool jacobianExo, int derivsOrder, int paramsDerivsOrder,
const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool use_dll, bool bytecode, bool nopreprocessoroutput, bool linear_decomposition);
const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool use_dll, bool bytecode, bool linear_decomposition);
//! Writes model initialization and lead/lag incidence matrix to output
void writeOutput(ostream &output, const string &basename, bool block, bool linear_decomposition, bool byte_code, bool use_dll, int order, bool estimation_present, bool compute_xrefs, bool julia) const;
......@@ -377,7 +377,7 @@ public:
void setLeadsLagsOrig();
//! Replaces model equations with derivatives of Lagrangian w.r.t. endogenous
void computeRamseyPolicyFOCs(const StaticModel &static_model, const bool nopreprocessoroutput);
void computeRamseyPolicyFOCs(const StaticModel &static_model);
//! Replaces the model equations in dynamic_model with those in this model
void replaceMyEquations(DynamicModel &dynamic_model) const;
......@@ -412,20 +412,20 @@ public:
//! Transforms the model by removing all leads greater or equal than 2 on endos
/*! Note that this can create new lags on endos and exos */
void substituteEndoLeadGreaterThanTwo(bool deterministic_model, bool nopreprocessoroutput);
void substituteEndoLeadGreaterThanTwo(bool deterministic_model);
//! Transforms the model by removing all lags greater or equal than 2 on endos
void substituteEndoLagGreaterThanTwo(bool deterministic_model, bool nopreprocessoroutput);
void substituteEndoLagGreaterThanTwo(bool deterministic_model);
//! Transforms the model by removing all leads on exos
/*! Note that this can create new lags on endos and exos */
void substituteExoLead(bool deterministic_model, bool nopreprocessoroutput);
void substituteExoLead(bool deterministic_model);
//! Transforms the model by removing all lags on exos
void substituteExoLag(bool deterministic_model, bool nopreprocessoroutput);
void substituteExoLag(bool deterministic_model);
//! Transforms the model by removing all UnaryOpcode::expectation
void substituteExpectation(bool partial_information_model, bool nopreprocessoroutput);
void substituteExpectation(bool partial_information_model);
//! Transforms the model by decreasing the lead/lag of predetermined variables in model equations by one
void transformPredeterminedVariables();
......@@ -437,16 +437,16 @@ public:
void substituteAdl();
//! Creates aux vars for all unary operators
void substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, bool nopreprocessoroutput);
void substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table);
//! Creates aux vars for certain unary operators: originally implemented for support of VARs
void substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, set<string> &eq_tags, bool nopreprocessoroutput);
void substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, set<string> &eq_tags);
//! Creates aux vars for certain unary operators: originally implemented for support of VARs
void substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, vector<int> &eqnumbers, bool nopreprocessoroutput);
void substituteUnaryOps(StaticModel &static_model, diff_table_t &nodes, ExprNode::subst_table_t &subst_table, vector<int> &eqnumbers);
//! Substitutes diff operator
void substituteDiff(StaticModel &static_model, diff_table_t &diff_table, ExprNode::subst_table_t &diff_subst_table, bool nopreprocessoroutput);
void substituteDiff(StaticModel &static_model, diff_table_t &diff_table, ExprNode::subst_table_t &diff_subst_table);
//! Substitute VarExpectation operators
void substituteVarExpectation(const map<string, expr_t> &subst_table);
......@@ -464,7 +464,7 @@ public:
//! Transforms the model by creating aux vars for the diff of forward vars
/*! If subset is empty, does the transformation for all fwrd vars; otherwise
restrict it to the vars in subset */
void differentiateForwardVars(const vector<string> &subset, bool nopreprocessoroutput);
void differentiateForwardVars(const vector<string> &subset);
//! Fills eval context with values of model local variables and auxiliary variables
void fillEvalContext(eval_context_t &eval_context) const;
......
......@@ -49,7 +49,7 @@ void main2(stringstream &in, const string &basename, bool debug, bool clear_all,
bool minimal_workspace, bool compute_xrefs, FileOutputType output_mode,
LanguageOutputType lang, int params_derivs_order, bool transform_unary_ops,
JsonOutputPointType json, JsonFileOutputType json_output_mode, bool onlyjson, bool jsonderivsimple,
bool nopreprocessoroutput, const string &mexext, const boost::filesystem::path &matlabroot,
const string &mexext, const boost::filesystem::path &matlabroot,
const boost::filesystem::path &dynareroot, bool onlymodel);
void main1(const string &filename, const string &basename, istream &modfile, bool debug, bool save_macro, string &save_macro_file,
......@@ -159,7 +159,6 @@ main(int argc, char **argv)
bool onlyjson = false;
bool jsonderivsimple = false;
LanguageOutputType language{LanguageOutputType::matlab};
bool nopreprocessoroutput = false;
string mexext;
boost::filesystem::path matlabroot;
boost::filesystem::path dynareroot{argv[0]};
......@@ -340,7 +339,7 @@ main(int argc, char **argv)
else if (s == "onlyjson")
onlyjson = true;
else if (s == "nopreprocessoroutput")
nopreprocessoroutput = true;
cout.rdbuf(nullptr);
else if (s == "jsonderivsimple")
jsonderivsimple = true;
else if (s.substr(0, 4) == "json")
......@@ -394,8 +393,7 @@ main(int argc, char **argv)
}
}
if (!nopreprocessoroutput)
cout << "Starting preprocessing of the model file ..." << endl;
cout << "Starting preprocessing of the model file ..." << endl;
// Construct basename (i.e. remove file extension if there is one)
string basename = argv[1];
......@@ -430,7 +428,7 @@ main(int argc, char **argv)
no_tmp_terms, no_log, no_warn, warn_uninit, console, nograph, nointeractive,
parallel, config_file, warnings, nostrict, stochastic, check_model_changes, minimal_workspace,
compute_xrefs, output_mode, language, params_derivs_order, transform_unary_ops,
json, json_output_mode, onlyjson, jsonderivsimple, nopreprocessoroutput,
json, json_output_mode, onlyjson, jsonderivsimple,
mexext, matlabroot, dynareroot, onlymodel);
return EXIT_SUCCESS;
......
......@@ -34,7 +34,7 @@ main2(stringstream &in, const string &basename, bool debug, bool clear_all, bool
bool minimal_workspace, bool compute_xrefs, FileOutputType output_mode,
LanguageOutputType language, int params_derivs_order, bool transform_unary_ops,
JsonOutputPointType json, JsonFileOutputType json_output_mode, bool onlyjson, bool jsonderivsimple,
bool nopreprocessoroutput, const string &mexext, const boost::filesystem::path &matlabroot,
const string &mexext, const boost::filesystem::path &matlabroot,
const boost::filesystem::path &dynareroot, bool onlymodel)
{
ParsingDriver p(warnings, nostrict);
......@@ -44,34 +44,33 @@ main2(stringstream &in, const string &basename, bool debug, bool clear_all, bool
// Do parsing and construct internal representation of mod file
unique_ptr<ModFile> mod_file = p.parse(in, debug);
if (json == JsonOutputPointType::parsing)
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson, nopreprocessoroutput);
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson);
// Run checking pass
mod_file->checkPass(nostrict, stochastic);
if (json == JsonOutputPointType::checkpass)
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson, nopreprocessoroutput);
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson);
// Perform transformations on the model (creation of auxiliary vars and equations)
mod_file->transformPass(nostrict, stochastic, compute_xrefs || json == JsonOutputPointType::transformpass, nopreprocessoroutput, transform_unary_ops);
mod_file->transformPass(nostrict, stochastic, compute_xrefs || json == JsonOutputPointType::transformpass, transform_unary_ops);
if (json == JsonOutputPointType::transformpass)
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson, nopreprocessoroutput);
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson);
// Evaluate parameters initialization, initval, endval and pounds
mod_file->evalAllExpressions(warn_uninit, nopreprocessoroutput);
mod_file->evalAllExpressions(warn_uninit);
// Do computations
mod_file->computingPass(no_tmp_terms, output_mode, params_derivs_order, nopreprocessoroutput);
mod_file->computingPass(no_tmp_terms, output_mode, params_derivs_order);
if (json == JsonOutputPointType::computingpass)
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson, nopreprocessoroutput, jsonderivsimple);
mod_file->writeJsonOutput(basename, json, json_output_mode, onlyjson, jsonderivsimple);
// Write outputs
if (output_mode != FileOutputType::none)
mod_file->writeExternalFiles(basename, output_mode, language, nopreprocessoroutput);
mod_file->writeExternalFiles(basename, output_mode, language);
else
mod_file->writeOutputFiles(basename, clear_all, clear_global, no_log, no_warn, console, nograph,
nointeractive, config_file, check_model_changes, minimal_workspace, compute_xrefs,
nopreprocessoroutput, mexext, matlabroot, dynareroot, onlymodel);
mexext, matlabroot, dynareroot, onlymodel);
if (!nopreprocessoroutput)
cout << "Preprocessing completed." << endl;
cout << "Preprocessing completed." << endl;
}
This diff is collapsed.
......@@ -137,17 +137,17 @@ public:
void addStatementAtFront(unique_ptr<Statement> st);
//! Evaluate all the statements
/*! \param warn_uninit Should a warning be displayed for uninitialized endogenous/exogenous/parameters ? */
void evalAllExpressions(bool warn_uninit, const bool nopreprocessoroutput);
void evalAllExpressions(bool warn_uninit);
//! Do some checking and fills mod_file_struct
/*! \todo add check for number of equations and endogenous if ramsey_policy is present */
void checkPass(bool nostrict, bool stochastic);
//! Perform some transformations on the model (creation of auxiliary vars and equations)
/*! \param compute_xrefs if true, equation cross references will be computed */
void transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const bool nopreprocessoroutput, const bool transform_unary_ops);
void transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const bool transform_unary_ops);
//! Execute computations
/*! \param no_tmp_terms if true, no temporary terms will be computed in the static and dynamic files */
/*! \param params_derivs_order compute this order of derivs wrt parameters */
void computingPass(bool no_tmp_terms, FileOutputType output, int params_derivs_order, const bool nopreprocessoroutput);
void computingPass(bool no_tmp_terms, FileOutputType output, int params_derivs_order);
//! Writes Matlab/Octave output files
/*!
\param basename The base name used for writing output files. Should be the name of the mod file without its extension
......@@ -163,17 +163,17 @@ public:
void writeOutputFiles(const string &basename, bool clear_all, bool clear_global, bool no_log, bool no_warn,
bool console, bool nograph, bool nointeractive, const ConfigFile &config_file,
bool check_model_changes, bool minimal_workspace, bool compute_xrefs,
const bool nopreprocessoroutput, const string &mexext, const boost::filesystem::path &matlabroot,
const string &mexext, const boost::filesystem::path &matlabroot,
const boost::filesystem::path &dynareroot, bool onlymodel) const;
void writeExternalFiles(const string &basename, FileOutputType output, LanguageOutputType language, const bool nopreprocessoroutput) const;
void writeExternalFilesJulia(const string &basename, FileOutputType output, const bool nopreprocessoroutput) const;
void writeExternalFiles(const string &basename, FileOutputType output, LanguageOutputType language) const;
void writeExternalFilesJulia(const string &basename, FileOutputType output) const;
void computeChecksum();
//! Write JSON representation of ModFile object
//! Initially created to enable Julia to work with .mod files
//! Potentially outputs ModFile after the various parts of processing (parsing, checkPass, transformPass, computingPass)
//! Allows user of other host language platforms (python, fortran, etc) to provide support for dynare .mod files
void writeJsonOutput(const string &basename, JsonOutputPointType json, JsonFileOutputType json_output_mode, bool onlyjson, const bool nopreprocessoroutput, bool jsonderivsimple = false);
void writeJsonOutput(const string &basename, JsonOutputPointType json, JsonFileOutputType json_output_mode, bool onlyjson, bool jsonderivsimple = false);
};
#endif // ! MOD_FILE_HH
......@@ -1186,7 +1186,7 @@ StaticModel::collect_first_order_derivatives_endogenous()
}
void
StaticModel::computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool bytecode, bool nopreprocessoroutput)
StaticModel::computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool bytecode)
{
initializeVariablesAndEquations();
......@@ -1216,15 +1216,13 @@ StaticModel::computingPass(int derivsOrder, int paramsDerivsOrder, const eval_co
}
// Launch computations
if (!nopreprocessoroutput)
cout << "Computing static model derivatives (order " << derivsOrder << ")." << endl;
cout << "Computing static model derivatives (order " << derivsOrder << ")." << endl;
computeDerivatives(derivsOrder, vars);
if (paramsDerivsOrder > 0)
{
if (!nopreprocessoroutput)
cout << "Computing static model derivatives w.r.t. parameters (order " << paramsDerivsOrder << ")." << endl;
cout << "Computing static model derivatives w.r.t. parameters (order " << paramsDerivsOrder << ")." << endl;
computeParamsDerivatives(paramsDerivsOrder);
}
......@@ -1246,8 +1244,7 @@ StaticModel::computingPass(int derivsOrder, int paramsDerivsOrder, const eval_co
equation_type_and_normalized_equation = equationTypeDetermination(first_order_endo_derivatives, variable_reordered, equation_reordered, mfs);
if (!nopreprocessoroutput)
cout << "Finding the optimal block decomposition of the model ..." << endl;
cout << "Finding the optimal block decomposition of the model ..." << endl;
lag_lead_vector_t equation_lag_lead, variable_lag_lead;
......
......@@ -190,7 +190,7 @@ public:
\param derivsOrder order of derivation with respect to endogenous
\param paramsDerivsOrder order of derivatives w.r. to a pair (endogenous, parameter) to be computed
*/
void computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool bytecode, bool nopreprocessoroutput);
void computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool bytecode);
//! Adds informations for simulation in a binary file for a block decomposed model
void Write_Inf_To_Bin_File_Block(const string &basename, const int &num,
......
Markdown is supported
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