Commit e5cee0fd authored by MichelJuillard's avatar MichelJuillard

build full static model for analytical derivatives

estimation code
parent f6f4ea70
......@@ -1058,6 +1058,12 @@ StaticModel::computingPass(const eval_context_t &eval_context, bool no_tmp_terms
neweqs.push_back(dynamic_cast<BinaryOpNode *>(eq_tmp->toStatic(*this)));
}
for (unsigned int eq = 0; eq < aux_equations.size(); eq++)
{
expr_t eq_tmp = aux_equations[eq]->substituteStaticAuxiliaryDefinition();
neweqs.push_back(dynamic_cast<BinaryOpNode *>(eq_tmp->toStatic(*this)));
}
equations.clear();
copy(neweqs.begin(),neweqs.end(),back_inserter(equations));
// Compute derivatives w.r. to all endogenous, and possibly exogenous and exogenous deterministic
......@@ -1066,8 +1072,8 @@ StaticModel::computingPass(const eval_context_t &eval_context, bool no_tmp_terms
for (int i = 0; i < symbol_table.endo_nbr(); i++)
{
int id = symbol_table.getID(eEndogenous, i);
if (!symbol_table.isAuxiliaryVariableButNotMultiplier(id))
vars.insert(getDerivID(id, 0));
// if (!symbol_table.isAuxiliaryVariableButNotMultiplier(id))
vars.insert(getDerivID(id, 0));
}
// Launch computations
......
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