polynomial_degree

(function from pyomo.core.expr.visitor)

pyomo.core.expr.visitor.polynomial_degree(node)[source]

Return the polynomial degree of the expression.

Parameters:

node – The root node of an expression tree.

Returns:

A non-negative integer that is the polynomial degree if the expression is polynomial, or None otherwise.