count_if

(函数来自 pyomo.core.expr.logical_expr)

pyomo.core.expr.logical_expr.count_if(*args)[源代码]

创建一个新的 CountIfExpression

计算值为True的参数的数量

用法: count_if(m.Y1, m.Y2, …)