count_if

(function from pyomo.core.expr.logical_expr)

pyomo.core.expr.logical_expr.count_if(*args)[source]

Creates a new CountIfExpression

Counts the number of True-valued arguments

Usage: count_if(m.Y1, m.Y2, …)