44 std::stringstream ostr;
45 const int64_t num_expressions = constraint.num_expressions();
46 std::vector<LinearExpression> expressions;
47 expressions.reserve(num_expressions);
48 for (
int i = 0; i < num_expressions; ++i) {
49 expressions.push_back(constraint.Expression(i));
51 ostr <<
"{" << absl::StrJoin(expressions,
", ", absl::StreamFormatter())
52 <<
"} is " << sos_type_name;
53 if (constraint.has_weights()) {
54 std::vector<std::string> weights(num_expressions);
55 for (
int i = 0; i < num_expressions; ++i) {
58 ostr <<
" with weights {" << absl::StrJoin(weights,
", ") <<
"}";