AbsExpr struct
#include <gtopt/constraint_expr.hpp>
abs(linear_expression) term (F5).
The inner expression is an arbitrary linear combination stored as a vector of ConstraintTerms. Lowering allocates one auxiliary non-negative variable t per occurrence and emits two rows enforcing t >= |inner|; the outer row substitutes coefficient * t for coefficient * abs(inner).
Nested abs(abs(...)) is rejected at parse time. Convexity of the outer constraint is enforced at lowering time: only <= with positive coefficient (or >= with negative coefficient) is accepted.
Public variables
- std::vector<ConstraintTerm> inner
- Linear expression inside abs(...).