diff --git a/src/ExprNode.hh b/src/ExprNode.hh index e5b47dca12d415f5136f7ad60175e37714d06f62..aa503a70492e062ce240e028e252abce6d106de9 100644 --- a/src/ExprNode.hh +++ b/src/ExprNode.hh @@ -1462,7 +1462,7 @@ public: [[nodiscard]] expr_t unpackPowerDeriv() const; //! Returns MULT_i*(lhs-rhs) = 0, creating multiplier MULT_i expr_t addMultipliersToConstraints(int i); - //! Returns the non-zero hand-side of an equation (that must have a hand side equal to zero) + //! Returns the non-zero hand side of an equation (that must have a hand side equal to zero) [[nodiscard]] expr_t getNonZeroPartofEquation() const; [[nodiscard]] bool isInStaticForm() const override; void fillAutoregressiveRow(int eqn, const vector<int>& lhs, diff --git a/src/ModelTree.hh b/src/ModelTree.hh index 512ec86261677078d1e993263a5263894cf3616a..f624774477ada52d208c7e560159522150110090 100644 --- a/src/ModelTree.hh +++ b/src/ModelTree.hh @@ -776,7 +776,7 @@ ModelTree::writeModelEquations(ostream& output, const temporary_terms_t& tempora BinaryOpNode* eq_node {equations[eq]}; expr_t lhs {eq_node->arg1}, rhs {eq_node->arg2}; - // Test if the right hand side of the equation is empty. + // Test if the right-hand side of the equation is empty. double vrhs {1.0}; try { @@ -786,7 +786,7 @@ ModelTree::writeModelEquations(ostream& output, const temporary_terms_t& tempora { } - if (vrhs != 0) // The right hand side of the equation is not empty ==> residual=lhs-rhs; + if (vrhs != 0) // The right-hand side of the equation is not empty ==> residual=lhs-rhs; { output << " residual" << LEFT_ARRAY_SUBSCRIPT(output_type) << eq + ARRAY_SUBSCRIPT_OFFSET(output_type) << RIGHT_ARRAY_SUBSCRIPT(output_type) @@ -796,7 +796,7 @@ ModelTree::writeModelEquations(ostream& output, const temporary_terms_t& tempora rhs->writeOutput(output, output_type, temporary_terms, temporary_terms_idxs); output << ");" << endl; } - else // The right hand side of the equation is empty ==> residual=lhs; + else // The right-hand side of the equation is empty ==> residual=lhs; { output << "residual" << LEFT_ARRAY_SUBSCRIPT(output_type) << eq + ARRAY_SUBSCRIPT_OFFSET(output_type) << RIGHT_ARRAY_SUBSCRIPT(output_type) @@ -1557,7 +1557,7 @@ ModelTree::writeBytecodeModelEquations(Bytecode::Writer& code_file, BinaryOpNode* eq_node {equations[eq]}; expr_t lhs {eq_node->arg1}, rhs {eq_node->arg2}; code_file << Bytecode::FNUMEXPR {Bytecode::ExpressionType::ModelEquation, eq}; - // Test if the right hand side of the equation is empty. + // Test if the right-hand side of the equation is empty. double vrhs {1.0}; try { @@ -1567,7 +1567,7 @@ ModelTree::writeBytecodeModelEquations(Bytecode::Writer& code_file, { } - if (vrhs != 0) // The right hand side of the equation is not empty ⇒ residual=lhs-rhs + if (vrhs != 0) // The right-hand side of the equation is not empty ⇒ residual=lhs-rhs { lhs->writeBytecodeOutput(code_file, output_type, temporary_terms, temporary_terms_idxs, tef_terms); @@ -1576,7 +1576,7 @@ ModelTree::writeBytecodeModelEquations(Bytecode::Writer& code_file, code_file << Bytecode::FBINARY {BinaryOpcode::minus} << Bytecode::FSTPR {eq}; } - else // The right hand side of the equation is empty ⇒ residual=lhs + else // The right-hand side of the equation is empty ⇒ residual=lhs { lhs->writeBytecodeOutput(code_file, output_type, temporary_terms, temporary_terms_idxs, tef_terms); diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc index eab3dd00cf82b50bfecf0b339b10f90df1415141..132119df417875e1e202c06dc79d5b64c056079b 100644 --- a/src/ParsingDriver.cc +++ b/src/ParsingDriver.cc @@ -1288,7 +1288,7 @@ void ParsingDriver::add_positive_restriction_element(expr_t value, const string& variable, const string& lag) { - // if the expression is not on the left handside, change its sign + // if the expression is not on the left-hand side, change its sign if (!svar_left_handside) value = add_uminus(value); @@ -1300,7 +1300,7 @@ ParsingDriver::add_positive_restriction_element(const string& variable, const st { expr_t value(data_tree->One); - // if the expression is not on the left handside, change its sign + // if the expression is not on the left-hand side, change its sign if (!svar_left_handside) value = add_uminus(value); @@ -1311,7 +1311,7 @@ void ParsingDriver::add_negative_restriction_element(expr_t value, const string& variable, const string& lag) { - // if the expression is on the left handside, change its sign + // if the expression is on the left-hand side, change its sign if (svar_left_handside) value = add_uminus(value); @@ -1323,7 +1323,7 @@ ParsingDriver::add_negative_restriction_element(const string& variable, const st { expr_t value(data_tree->One); - // if the expression is on the left handside, change its sign + // if the expression is on the left-hand side, change its sign if (svar_left_handside) value = add_uminus(value); @@ -2666,18 +2666,18 @@ ParsingDriver::add_model_equal(expr_t arg1, expr_t arg2, map<string, string> eq_ } catch (SymbolTable::UnknownSymbolNameException&) { - error("Left hand-side of expression in 'mcp' tag is not a variable"); + error("Left-hand side of expression in 'mcp' tag is not a variable"); } }()}; if (mod_file->symbol_table.getType(symb_id) != SymbolType::endogenous) - error("Left hand-side of expression in 'mcp' tag is not an endogenous variable"); + error("Left-hand side of expression in 'mcp' tag is not an endogenous variable"); expr_t matched_constant {[&] { char* str_end; double d = strtod(constant.c_str(), &str_end); if (str_end == constant.c_str()) - error("Right hand-side of expression in 'mcp' tag should be a constant"); + error("Right-hand side of expression in 'mcp' tag should be a constant"); return data_tree->AddPossiblyNegativeConstant(d); }()};