sum_product
(function from pyomo.core.util
)
- pyomo.core.util.sum_product(*args, **kwds)[source]
A utility function to compute a generalized dot product.
This function accepts one or more components that provide terms that are multiplied together. These products are added together to form a sum.
- Parameters:
*args – Variable length argument list of generators that create terms in the summation.
**kwds – Arbitrary keyword arguments.
- Keyword Arguments:
index – A set that is used to index the components used to create the terms
denom – A component or tuple of components that are used to create the denominator of the terms
start – The initial value used in the sum
- Returns:
The value of the sum.