convert_pyomo2scipy

(function from pyomo.dae.simulator)

pyomo.dae.simulator.convert_pyomo2scipy(expr, templatemap)[source]

Substitute _GetItem nodes in an expression tree.

This substitution function is used to replace Pyomo _GetItem nodes with mutable Params.

Parameters:

templatemap – dictionary mapping _GetItemIndexer objects to mutable params

Returns:

a new expression tree with all substitutions done