Merge branch 'ramsey_k_order' into 'master'
Allows to write M_.NNZDerivatives_objective in the driver.m file See merge request Dynare/preprocessor!36issue#70
commit
0213c9be73
|
@ -2225,6 +2225,10 @@ PlannerObjectiveStatement::computingPass()
|
||||||
void
|
void
|
||||||
PlannerObjectiveStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const
|
PlannerObjectiveStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const
|
||||||
{
|
{
|
||||||
|
output << "M_.NNZDerivatives_objective = [";
|
||||||
|
for (int i=1; i < static_cast<int>(model_tree.getNNZDerivatives().size()); i++)
|
||||||
|
output << (i > model_tree.getComputedDerivsOrder() ? -1 : model_tree.getNNZDerivatives()[i]) << ";";
|
||||||
|
output << "];";
|
||||||
model_tree.writeStaticFile(basename + ".objective", false, false, false, "", {}, {}, false);
|
model_tree.writeStaticFile(basename + ".objective", false, false, false, "", {}, {}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -455,6 +455,20 @@ public:
|
||||||
return equation_tags.getTagsByEqn(eq);
|
return equation_tags.getTagsByEqn(eq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Returns the vector of non-zero derivative counts
|
||||||
|
inline const vector<int> &
|
||||||
|
getNNZDerivatives() const
|
||||||
|
{
|
||||||
|
return NNZDerivatives;
|
||||||
|
}
|
||||||
|
|
||||||
|
//!Returns the maximum order of computed derivatives
|
||||||
|
inline int
|
||||||
|
getComputedDerivsOrder() const
|
||||||
|
{
|
||||||
|
return computed_derivs_order;
|
||||||
|
}
|
||||||
|
|
||||||
inline static string
|
inline static string
|
||||||
BlockSim(BlockSimulationType type)
|
BlockSim(BlockSimulationType type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue