gtopt::ConstraintTerm struct

A single term in a constraint expression.

Either:

  • coefficient × element reference (single variable term)
  • coefficient × sum reference (aggregation term)
  • coefficient × named parameter (resolved at LP time)
  • standalone coefficient (constant term, all nullopt)

Public variables

double coefficient
Scalar multiplier.
std::optional<ElementRef> element
Single element (nullopt = none)
std::optional<std::string> param_name
Named user parameter (nullopt = none)
std::optional<SumElementRef> sum_ref
Sum aggregation (nullopt = none)