Fix error message when using pac_expectation with occbin_constraints

By the way, also fix the argument name (the model is not a VAR).
pac-components
Sébastien Villemot 2021-10-29 14:08:03 +02:00
parent bc827326eb
commit 0123326123
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 4 additions and 4 deletions

View File

@ -2580,12 +2580,12 @@ ParsingDriver::add_var_expectation(const string &model_name)
} }
expr_t expr_t
ParsingDriver::add_pac_expectation(const string &var_model_name) ParsingDriver::add_pac_expectation(const string &model_name)
{ {
if (data_tree == occbin_constraints_tree.get()) if (data_tree == occbin_constraints_tree.get())
error("The 'var_expectation' operator is forbidden in 'occbin_constraints'."); error("The 'pac_expectation' operator is forbidden in 'occbin_constraints'.");
return data_tree->AddPacExpectation(var_model_name); return data_tree->AddPacExpectation(model_name);
} }
void void

View File

@ -738,7 +738,7 @@ public:
//! Writes token "VAR_EXPECTATION(model_name)" to model tree //! Writes token "VAR_EXPECTATION(model_name)" to model tree
expr_t add_var_expectation(const string &model_name); expr_t add_var_expectation(const string &model_name);
//! Writes token "PAC_EXPECTATION(model_name, discount, growth)" to model tree //! Writes token "PAC_EXPECTATION(model_name, discount, growth)" to model tree
expr_t add_pac_expectation(const string &var_model_name); expr_t add_pac_expectation(const string &model_name);
//! Creates pac_model statement //! Creates pac_model statement
void begin_pac_growth(); void begin_pac_growth();
void begin_pac_model(); void begin_pac_model();