convert_pyomo2casadi

(function from pyomo.dae.simulator)

pyomo.dae.simulator.convert_pyomo2casadi(expr)[source]

Convert a Pyomo expression tree to Casadi.

This function replaces a Pyomo expression with a CasADi expression. This assumes that the substitute_pyomo2casadi function has been called, so the Pyomo expression contains CasADi variables and intrinsic functions. The resulting expression can be used with the CasADi integrator.

Parameters:

expr – a Pyomo expression with CasADi variables and intrinsic functions

Returns:

a CasADi expression tree.