Forbid exogenous and exogenous deterministic variables in STEADY_STATE operator
Closes: dynare#825issue#70
parent
61ea8811de
commit
d008113d69
|
@ -2902,6 +2902,15 @@ ParsingDriver::add_erf(expr_t arg1)
|
|||
expr_t
|
||||
ParsingDriver::add_steady_state(expr_t arg1)
|
||||
{
|
||||
// Forbid exogenous variables, see dynare#825
|
||||
set<int> r;
|
||||
arg1->collectVariables(SymbolType::exogenous, r);
|
||||
if (r.size() > 0)
|
||||
error("Exogenous variables are not allowed in the context of the STEADY_STATE() operator.");
|
||||
arg1->collectVariables(SymbolType::exogenousDet, r);
|
||||
if (r.size() > 0)
|
||||
error("Exogenous deterministic variables are not allowed in the context of the STEADY_STATE() operator.");
|
||||
|
||||
return data_tree->AddSteadyState(arg1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue