find_infeasible_constraints

(函数来自 pyomo.util.infeasible)

pyomo.util.infeasible.find_infeasible_constraints(m, tol=1e-06)[source]

在模型中找到不可行的约束。

使用当前模型状态。

Parameters:
  • m (Block) – 要检查的Pyomo块或模型

  • tol (float) – 绝对可行性容差

Yields:
  • constr (ConstraintData) – 不可行的约束对象

  • body_value (float 或 None) – 约束体的数值(如果表达式评估出错则为 None)

  • 不可行 (int) – 一个位掩码,指示哪个边界不可行(1 表示下界,2 表示上界,或 4 如果主体或边界未定义)