gtopt::MinMaxExpr struct

max(arg1, arg2, ...) / min(arg1, arg2, ...) term (F7).

Each arg is itself a linear combination. Lowering allocates one auxiliary variable t per occurrence and emits one row per argument (arg_i − t ≤ 0 for max, t − arg_i ≤ 0 for min). The outer row substitutes coefficient * t for coefficient * max/min(args).

Convexity:

  • max(...) ≤ k or c·max(...) + ... ≤ k with c > 0.
  • min(...) ≥ k or c·min(...) + ... ≥ k with c > 0.
  • Opposite-direction uses with negative coefficients are equivalent and also accepted. All other combinations are rejected.

Public variables

std::vector<std::vector<ConstraintTerm>> args
MinMaxKind kind