create_partial_expression

(function from pyomo.dae.misc)

pyomo.dae.misc.create_partial_expression(scheme, expr, ind, loc)[source]

This method returns a function which applies a discretization scheme to an expression along a particular indexing set. This is admittedly a convoluted looking implementation. The idea is that we only apply a discretization scheme to one indexing set at a time but we also want the function to be expanded over any other indexing sets.