When order option > 3, compute planner objective derivatives at that order
Ref. dynare!1866issue#70
parent
04f242f971
commit
86b2b4c2da
|
@ -2202,9 +2202,9 @@ PlannerObjectiveStatement::getPlannerObjective() const
|
|||
}
|
||||
|
||||
void
|
||||
PlannerObjectiveStatement::computingPass()
|
||||
PlannerObjectiveStatement::computingPass(const ModFileStructure &mod_file_struct)
|
||||
{
|
||||
model_tree.computingPass(3, 0, {}, false, false, false);
|
||||
model_tree.computingPass(max(3, mod_file_struct.order_option), 0, {}, false, false, false);
|
||||
computing_pass_called = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -517,7 +517,7 @@ public:
|
|||
(no exogenous, no lead/lag) */
|
||||
void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override;
|
||||
/*! \todo allow for the possibility of disabling temporary terms */
|
||||
void computingPass() override;
|
||||
void computingPass(const ModFileStructure &mod_file_struct) override;
|
||||
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
|
||||
void writeJsonOutput(ostream &output) const override;
|
||||
//! Return a reference the Planner Objective model tree
|
||||
|
|
|
@ -840,7 +840,7 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o
|
|||
}
|
||||
|
||||
for (auto &statement : statements)
|
||||
statement->computingPass();
|
||||
statement->computingPass(mod_file_struct);
|
||||
|
||||
// Compute epilogue derivatives (but silence standard output)
|
||||
streambuf *oldcout = cout.rdbuf();
|
||||
|
|
|
@ -30,7 +30,7 @@ Statement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &wa
|
|||
}
|
||||
|
||||
void
|
||||
Statement::computingPass()
|
||||
Statement::computingPass(const ModFileStructure &mod_file_struct)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ public:
|
|||
method. Otherwise the default implementation (i.e. a no-op) will apply and
|
||||
some checks won't be run. */
|
||||
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
|
||||
virtual void computingPass();
|
||||
virtual void computingPass(const ModFileStructure &mod_file_struct);
|
||||
//! Write Matlab output code
|
||||
/*!
|
||||
\param output is the output stream of the main matlab file
|
||||
|
|
Loading…
Reference in New Issue