(function from pyomo.contrib.sensitivity_toolbox.pynumero)
pyomo.contrib.sensitivity_toolbox.pynumero
Calculate the derivatives of the state variables (s) with respect to parameters (p) (ds/dp), and the derivative of the objective function (f) with respect to p (df/dp). The number of parameters in theta should be the same as the number of degrees of freedom.
model (pyomo.environ.Block | pyomo.contrib.pynumero.interfaces.PyomoNLP) – Model to calculate sensitivity on. To retain the cached objects in the pynumero interface, create a PyomoNLP first and pass it to this function.
theta (list) – A list of parameters as pyomo.environ.VarData, the number of parameters should be equal to the degrees of freedom.
ds/dp (ns + np by np), df/dp (1 by np), row map, column map. The column map maps Pyomo variables p to columns and the row map maps Pyomo variables s to rows.
scipy.sparse.csc_matrix, csc_matrix, ComponentMap, ComponentMap