Remove implementation of various methods of PacExpectationNode
Those implementations are dummy and are normally never used. Rather error out on those, factorizing them within SubModelNode.pac-components
parent
3e242dd481
commit
c4e9432eef
461
src/ExprNode.cc
461
src/ExprNode.cc
|
@ -7909,6 +7909,24 @@ SubModelNode::SubModelNode(DataTree &datatree_arg,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SubModelNode::computeTemporaryTerms(const pair<int, int> &derivOrder,
|
||||||
|
map<pair<int, int>, temporary_terms_t> &temp_terms_map,
|
||||||
|
map<expr_t, pair<int, pair<int, int>>> &reference_count,
|
||||||
|
bool is_matlab) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::computeTemporaryTerms not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SubModelNode::computeBlockTemporaryTerms(int blk, int eq, vector<vector<temporary_terms_t>> &blocks_temporary_terms,
|
||||||
|
map<expr_t, tuple<int, int, int>> &reference_count) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::computeBlocksTemporaryTerms not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
expr_t
|
expr_t
|
||||||
SubModelNode::toStatic(DataTree &static_datatree) const
|
SubModelNode::toStatic(DataTree &static_datatree) const
|
||||||
{
|
{
|
||||||
|
@ -7937,6 +7955,105 @@ SubModelNode::getChainRuleDerivative(int deriv_id, const map<int, BinaryOpNode *
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SubModelNode::maxEndoLead() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::maxEndoLead not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SubModelNode::maxExoLead() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::maxExoLead not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SubModelNode::maxEndoLag() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::maxEndoLead not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SubModelNode::maxExoLag() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::maxExoLead not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SubModelNode::maxLead() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::maxLead not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SubModelNode::maxLag() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::maxLag not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::undiff() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::undiff not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SubModelNode::VarMaxLag(const set<expr_t> &lhs_lag_equiv) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::VarMaxLag not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::decreaseLeadsLags(int n) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::decreaseLeadsLags not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
SubModelNode::countDiffs() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::countDiffs not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::substituteEndoLeadGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::substituteEndoLeadGreaterThanTwo not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::substituteEndoLagGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::substituteEndoLagGreaterThanTwo not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::substituteExoLead not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::substituteExoLag not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SubModelNode::containsExternalFunction() const
|
SubModelNode::containsExternalFunction() const
|
||||||
{
|
{
|
||||||
|
@ -8070,6 +8187,41 @@ SubModelNode::replaceVarsInEquation(map<VariableNode *, NumConstNode *> &table)
|
||||||
return const_cast<SubModelNode *>(this);
|
return const_cast<SubModelNode *>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::differentiateForwardVars not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::decreaseLeadsLagsPredeterminedVariables() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::decreaseLeadsLagsPredeterminedVariables not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::replaceTrendVar() const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::replaceTrendVar not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::detrend(int symb_id, bool log_trend, expr_t trend) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::detrend not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
expr_t
|
||||||
|
SubModelNode::removeTrendLeadLag(const map<int, expr_t> &trend_symbols_map) const
|
||||||
|
{
|
||||||
|
cerr << "SubModelNode::removeTrendLeadLag not implemented." << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
VarExpectationNode::VarExpectationNode(DataTree &datatree_arg,
|
VarExpectationNode::VarExpectationNode(DataTree &datatree_arg,
|
||||||
int idx_arg,
|
int idx_arg,
|
||||||
string model_name_arg) :
|
string model_name_arg) :
|
||||||
|
@ -8077,30 +8229,26 @@ VarExpectationNode::VarExpectationNode(DataTree &datatree_arg,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
VarExpectationNode::computeTemporaryTerms(const pair<int, int> &derivOrder,
|
|
||||||
map<pair<int, int>, temporary_terms_t> &temp_terms_map,
|
|
||||||
map<expr_t, pair<int, pair<int, int>>> &reference_count,
|
|
||||||
bool is_matlab) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::computeTemporaryTerms not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
VarExpectationNode::computeBlockTemporaryTerms(int blk, int eq, vector<vector<temporary_terms_t>> &blocks_temporary_terms,
|
|
||||||
map<expr_t, tuple<int, int, int>> &reference_count) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::computeBlocksTemporaryTerms not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
expr_t
|
||||||
VarExpectationNode::clone(DataTree &datatree) const
|
VarExpectationNode::clone(DataTree &datatree) const
|
||||||
{
|
{
|
||||||
return datatree.AddVarExpectation(model_name);
|
return datatree.AddVarExpectation(model_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
VarExpectationNode::maxLagWithDiffsExpanded() const
|
||||||
|
{
|
||||||
|
/* This node will be substituted by lagged variables, so in theory we should
|
||||||
|
return a strictly positive value. But from here this value is not easy to
|
||||||
|
compute.
|
||||||
|
We return 0, because currently this function is only called from
|
||||||
|
DynamicModel::setLeadsLagsOrig(), and the maximum lag will nevertheless be
|
||||||
|
correctly computed because the maximum lag of the VAR will be taken into
|
||||||
|
account via the corresponding equations. */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VarExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
VarExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
const temporary_terms_t &temporary_terms,
|
const temporary_terms_t &temporary_terms,
|
||||||
|
@ -8119,118 +8267,6 @@ VarExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::maxEndoLead() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::maxEndoLead not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::maxExoLead() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::maxExoLead not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::maxEndoLag() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::maxEndoLead not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::maxExoLag() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::maxExoLead not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::maxLead() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::maxLead not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::maxLag() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::maxLag not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::maxLagWithDiffsExpanded() const
|
|
||||||
{
|
|
||||||
/* This node will be substituted by lagged variables, so in theory we should
|
|
||||||
return a strictly positive value. But from here this value is not easy to
|
|
||||||
compute.
|
|
||||||
We return 0, because currently this function is only called from
|
|
||||||
DynamicModel::setLeadsLagsOrig(), and the maximum lag will nevertheless be
|
|
||||||
correctly computed because the maximum lag of the VAR will be taken into
|
|
||||||
account via the corresponding equations. */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::undiff() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::undiff not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::VarMaxLag(const set<expr_t> &lhs_lag_equiv) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::VarMaxLag not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::decreaseLeadsLags(int n) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::decreaseLeadsLags not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
VarExpectationNode::countDiffs() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::countDiffs not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::substituteEndoLeadGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::substituteEndoLeadGreaterThanTwo not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::substituteEndoLagGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::substituteEndoLagGreaterThanTwo not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::substituteExoLead not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::substituteExoLag not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
expr_t
|
||||||
VarExpectationNode::substituteVarExpectation(const map<string, expr_t> &subst_table) const
|
VarExpectationNode::substituteVarExpectation(const map<string, expr_t> &subst_table) const
|
||||||
{
|
{
|
||||||
|
@ -8249,47 +8285,12 @@ VarExpectationNode::substitutePacExpectation(const string &name, expr_t subexpr)
|
||||||
return const_cast<VarExpectationNode *>(this);
|
return const_cast<VarExpectationNode *>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::differentiateForwardVars not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
VarExpectationNode::containsPacExpectation(const string &pac_model_name) const
|
VarExpectationNode::containsPacExpectation(const string &pac_model_name) const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::decreaseLeadsLagsPredeterminedVariables() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::decreaseLeadsLagsPredeterminedVariables not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::replaceTrendVar() const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::replaceTrendVar not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::detrend(int symb_id, bool log_trend, expr_t trend) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::detrend not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
VarExpectationNode::removeTrendLeadLag(const map<int, expr_t> &trend_symbols_map) const
|
|
||||||
{
|
|
||||||
cerr << "VarExpectationNode::removeTrendLeadLag not implemented." << endl;
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
VarExpectationNode::writeJsonAST(ostream &output) const
|
VarExpectationNode::writeJsonAST(ostream &output) const
|
||||||
{
|
{
|
||||||
|
@ -8315,22 +8316,6 @@ PacExpectationNode::PacExpectationNode(DataTree &datatree_arg,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
PacExpectationNode::computeTemporaryTerms(const pair<int, int> &derivOrder,
|
|
||||||
map<pair<int, int>, temporary_terms_t> &temp_terms_map,
|
|
||||||
map<expr_t, pair<int, pair<int, int>>> &reference_count,
|
|
||||||
bool is_matlab) const
|
|
||||||
{
|
|
||||||
temp_terms_map[derivOrder].insert(const_cast<PacExpectationNode *>(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
PacExpectationNode::computeBlockTemporaryTerms(int blk, int eq, vector<vector<temporary_terms_t>> &blocks_temporary_terms,
|
|
||||||
map<expr_t, tuple<int, int, int>> &reference_count) const
|
|
||||||
{
|
|
||||||
blocks_temporary_terms[blk][eq].insert(const_cast<PacExpectationNode *>(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
expr_t
|
||||||
PacExpectationNode::clone(DataTree &datatree) const
|
PacExpectationNode::clone(DataTree &datatree) const
|
||||||
{
|
{
|
||||||
|
@ -8351,42 +8336,6 @@ PacExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
PacExpectationNode::maxEndoLead() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
PacExpectationNode::maxExoLead() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
PacExpectationNode::maxEndoLag() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
PacExpectationNode::maxExoLag() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
PacExpectationNode::maxLead() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
PacExpectationNode::maxLag() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
PacExpectationNode::maxLagWithDiffsExpanded() const
|
PacExpectationNode::maxLagWithDiffsExpanded() const
|
||||||
{
|
{
|
||||||
|
@ -8394,66 +8343,12 @@ PacExpectationNode::maxLagWithDiffsExpanded() const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::undiff() const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
PacExpectationNode::VarMaxLag(const set<expr_t> &lhs_lag_equiv) const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::decreaseLeadsLags(int n) const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
PacExpectationNode::countDiffs() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::substituteEndoLeadGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::substituteEndoLagGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
expr_t
|
||||||
PacExpectationNode::substituteVarExpectation(const map<string, expr_t> &subst_table) const
|
PacExpectationNode::substituteVarExpectation(const map<string, expr_t> &subst_table) const
|
||||||
{
|
{
|
||||||
return const_cast<PacExpectationNode *>(this);
|
return const_cast<PacExpectationNode *>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PacExpectationNode::containsPacExpectation(const string &pac_model_name) const
|
PacExpectationNode::containsPacExpectation(const string &pac_model_name) const
|
||||||
{
|
{
|
||||||
|
@ -8463,30 +8358,6 @@ PacExpectationNode::containsPacExpectation(const string &pac_model_name) const
|
||||||
return pac_model_name == model_name;
|
return pac_model_name == model_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::decreaseLeadsLagsPredeterminedVariables() const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::replaceTrendVar() const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::detrend(int symb_id, bool log_trend, expr_t trend) const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr_t
|
|
||||||
PacExpectationNode::removeTrendLeadLag(const map<int, expr_t> &trend_symbols_map) const
|
|
||||||
{
|
|
||||||
return const_cast<PacExpectationNode *>(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PacExpectationNode::writeJsonAST(ostream &output) const
|
PacExpectationNode::writeJsonAST(ostream &output) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -1431,10 +1431,30 @@ class SubModelNode : public ExprNode
|
||||||
public:
|
public:
|
||||||
const string model_name;
|
const string model_name;
|
||||||
SubModelNode(DataTree &datatree_arg, int idx_arg, string model_name_arg);
|
SubModelNode(DataTree &datatree_arg, int idx_arg, string model_name_arg);
|
||||||
|
void computeTemporaryTerms(const pair<int, int> &derivOrder,
|
||||||
|
map<pair<int, int>, temporary_terms_t> &temp_terms_map,
|
||||||
|
map<expr_t, pair<int, pair<int, int>>> &reference_count,
|
||||||
|
bool is_matlab) const override;
|
||||||
|
void computeBlockTemporaryTerms(int blk, int eq, vector<vector<temporary_terms_t>> &blocks_temporary_terms,
|
||||||
|
map<expr_t, tuple<int, int, int>> &reference_count) const override;
|
||||||
expr_t toStatic(DataTree &static_datatree) const override;
|
expr_t toStatic(DataTree &static_datatree) const override;
|
||||||
void prepareForDerivation() override;
|
void prepareForDerivation() override;
|
||||||
expr_t computeDerivative(int deriv_id) override;
|
expr_t computeDerivative(int deriv_id) override;
|
||||||
expr_t getChainRuleDerivative(int deriv_id, const map<int, BinaryOpNode *> &recursive_variables) override;
|
expr_t getChainRuleDerivative(int deriv_id, const map<int, BinaryOpNode *> &recursive_variables) override;
|
||||||
|
int maxEndoLead() const override;
|
||||||
|
int maxExoLead() const override;
|
||||||
|
int maxEndoLag() const override;
|
||||||
|
int maxExoLag() const override;
|
||||||
|
int maxLead() const override;
|
||||||
|
int maxLag() const override;
|
||||||
|
int VarMaxLag(const set<expr_t> &lhs_lag_equiv) const override;
|
||||||
|
expr_t undiff() const override;
|
||||||
|
expr_t decreaseLeadsLags(int n) const override;
|
||||||
|
int countDiffs() const override;
|
||||||
|
expr_t substituteEndoLeadGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const override;
|
||||||
|
expr_t substituteEndoLagGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
||||||
|
expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const override;
|
||||||
|
expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
||||||
bool containsExternalFunction() const override;
|
bool containsExternalFunction() const override;
|
||||||
double eval(const eval_context_t &eval_context) const noexcept(false) override;
|
double eval(const eval_context_t &eval_context) const noexcept(false) override;
|
||||||
void computeXrefs(EquationInfo &ei) const override;
|
void computeXrefs(EquationInfo &ei) const override;
|
||||||
|
@ -1460,42 +1480,22 @@ public:
|
||||||
expr_t replaceVarsInEquation(map<VariableNode *, NumConstNode *> &table) const override;
|
expr_t replaceVarsInEquation(map<VariableNode *, NumConstNode *> &table) const override;
|
||||||
bool isParamTimesEndogExpr() const override;
|
bool isParamTimesEndogExpr() const override;
|
||||||
expr_t substituteStaticAuxiliaryVariable() const override;
|
expr_t substituteStaticAuxiliaryVariable() const override;
|
||||||
|
expr_t differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
||||||
|
expr_t decreaseLeadsLagsPredeterminedVariables() const override;
|
||||||
|
expr_t replaceTrendVar() const override;
|
||||||
|
expr_t detrend(int symb_id, bool log_trend, expr_t trend) const override;
|
||||||
|
expr_t removeTrendLeadLag(const map<int, expr_t> &trend_symbols_map) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class VarExpectationNode : public SubModelNode
|
class VarExpectationNode : public SubModelNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VarExpectationNode(DataTree &datatree_arg, int idx_arg, string model_name_arg);
|
VarExpectationNode(DataTree &datatree_arg, int idx_arg, string model_name_arg);
|
||||||
void computeTemporaryTerms(const pair<int, int> &derivOrder,
|
|
||||||
map<pair<int, int>, temporary_terms_t> &temp_terms_map,
|
|
||||||
map<expr_t, pair<int, pair<int, int>>> &reference_count,
|
|
||||||
bool is_matlab) const override;
|
|
||||||
void computeBlockTemporaryTerms(int blk, int eq, vector<vector<temporary_terms_t>> &blocks_temporary_terms,
|
|
||||||
map<expr_t, tuple<int, int, int>> &reference_count) const override;
|
|
||||||
void writeOutput(ostream &output, ExprNodeOutputType output_type, const temporary_terms_t &temporary_terms, const temporary_terms_idxs_t &temporary_terms_idxs, const deriv_node_temp_terms_t &tef_terms) const override;
|
void writeOutput(ostream &output, ExprNodeOutputType output_type, const temporary_terms_t &temporary_terms, const temporary_terms_idxs_t &temporary_terms_idxs, const deriv_node_temp_terms_t &tef_terms) const override;
|
||||||
expr_t clone(DataTree &datatree) const override;
|
expr_t clone(DataTree &datatree) const override;
|
||||||
int maxEndoLead() const override;
|
|
||||||
int maxExoLead() const override;
|
|
||||||
int maxEndoLag() const override;
|
|
||||||
int maxExoLag() const override;
|
|
||||||
int maxLead() const override;
|
|
||||||
int maxLag() const override;
|
|
||||||
int maxLagWithDiffsExpanded() const override;
|
int maxLagWithDiffsExpanded() const override;
|
||||||
int VarMaxLag(const set<expr_t> &lhs_lag_equiv) const override;
|
|
||||||
expr_t undiff() const override;
|
|
||||||
expr_t decreaseLeadsLags(int n) const override;
|
|
||||||
expr_t substituteEndoLeadGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const override;
|
|
||||||
expr_t substituteEndoLagGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
|
||||||
expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const override;
|
|
||||||
expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
|
||||||
expr_t substituteVarExpectation(const map<string, expr_t> &subst_table) const override;
|
expr_t substituteVarExpectation(const map<string, expr_t> &subst_table) const override;
|
||||||
expr_t substitutePacExpectation(const string &name, expr_t subexpr) override;
|
expr_t substitutePacExpectation(const string &name, expr_t subexpr) override;
|
||||||
int countDiffs() const override;
|
|
||||||
expr_t differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
|
||||||
expr_t decreaseLeadsLagsPredeterminedVariables() const override;
|
|
||||||
expr_t replaceTrendVar() const override;
|
|
||||||
expr_t detrend(int symb_id, bool log_trend, expr_t trend) const override;
|
|
||||||
expr_t removeTrendLeadLag(const map<int, expr_t> &trend_symbols_map) const override;
|
|
||||||
bool containsPacExpectation(const string &pac_model_name = "") const override;
|
bool containsPacExpectation(const string &pac_model_name = "") const override;
|
||||||
void writeJsonAST(ostream &output) const override;
|
void writeJsonAST(ostream &output) const override;
|
||||||
void writeJsonOutput(ostream &output, const temporary_terms_t &temporary_terms, const deriv_node_temp_terms_t &tef_terms, bool isdynamic) const override;
|
void writeJsonOutput(ostream &output, const temporary_terms_t &temporary_terms, const deriv_node_temp_terms_t &tef_terms, bool isdynamic) const override;
|
||||||
|
@ -1505,36 +1505,11 @@ class PacExpectationNode : public SubModelNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PacExpectationNode(DataTree &datatree_arg, int idx_arg, string model_name);
|
PacExpectationNode(DataTree &datatree_arg, int idx_arg, string model_name);
|
||||||
void computeTemporaryTerms(const pair<int, int> &derivOrder,
|
|
||||||
map<pair<int, int>, temporary_terms_t> &temp_terms_map,
|
|
||||||
map<expr_t, pair<int, pair<int, int>>> &reference_count,
|
|
||||||
bool is_matlab) const override;
|
|
||||||
void computeBlockTemporaryTerms(int blk, int eq, vector<vector<temporary_terms_t>> &blocks_temporary_terms,
|
|
||||||
map<expr_t, tuple<int, int, int>> &reference_count) const override;
|
|
||||||
void writeOutput(ostream &output, ExprNodeOutputType output_type, const temporary_terms_t &temporary_terms, const temporary_terms_idxs_t &temporary_terms_idxs, const deriv_node_temp_terms_t &tef_terms) const override;
|
void writeOutput(ostream &output, ExprNodeOutputType output_type, const temporary_terms_t &temporary_terms, const temporary_terms_idxs_t &temporary_terms_idxs, const deriv_node_temp_terms_t &tef_terms) const override;
|
||||||
expr_t clone(DataTree &datatree) const override;
|
expr_t clone(DataTree &datatree) const override;
|
||||||
int maxEndoLead() const override;
|
|
||||||
int maxExoLead() const override;
|
|
||||||
int maxEndoLag() const override;
|
|
||||||
int maxExoLag() const override;
|
|
||||||
int maxLead() const override;
|
|
||||||
int maxLag() const override;
|
|
||||||
int maxLagWithDiffsExpanded() const override;
|
int maxLagWithDiffsExpanded() const override;
|
||||||
int VarMaxLag(const set<expr_t> &lhs_lag_equiv) const override;
|
|
||||||
expr_t undiff() const override;
|
|
||||||
expr_t decreaseLeadsLags(int n) const override;
|
|
||||||
expr_t substituteEndoLeadGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const override;
|
|
||||||
expr_t substituteEndoLagGreaterThanTwo(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
|
||||||
expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const override;
|
|
||||||
expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
|
||||||
expr_t substituteVarExpectation(const map<string, expr_t> &subst_table) const override;
|
expr_t substituteVarExpectation(const map<string, expr_t> &subst_table) const override;
|
||||||
expr_t substitutePacExpectation(const string &name, expr_t subexpr) override;
|
expr_t substitutePacExpectation(const string &name, expr_t subexpr) override;
|
||||||
int countDiffs() const override;
|
|
||||||
expr_t differentiateForwardVars(const vector<string> &subset, subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const override;
|
|
||||||
expr_t decreaseLeadsLagsPredeterminedVariables() const override;
|
|
||||||
expr_t replaceTrendVar() const override;
|
|
||||||
expr_t detrend(int symb_id, bool log_trend, expr_t trend) const override;
|
|
||||||
expr_t removeTrendLeadLag(const map<int, expr_t> &trend_symbols_map) const override;
|
|
||||||
bool containsPacExpectation(const string &pac_model_name = "") const override;
|
bool containsPacExpectation(const string &pac_model_name = "") const override;
|
||||||
void writeJsonAST(ostream &output) const override;
|
void writeJsonAST(ostream &output) const override;
|
||||||
void writeJsonOutput(ostream &output, const temporary_terms_t &temporary_terms, const deriv_node_temp_terms_t &tef_terms, bool isdynamic) const override;
|
void writeJsonOutput(ostream &output, const temporary_terms_t &temporary_terms, const deriv_node_temp_terms_t &tef_terms, bool isdynamic) const override;
|
||||||
|
|
Loading…
Reference in New Issue