get_dydp

(function from pyomo.contrib.sensitivity_toolbox.pynumero)

pyomo.contrib.sensitivity_toolbox.pynumero.get_dydp(y_list, dsdp, row_map, column_map=None)[source]

Reduce the sensitivity matrix from get_dsdp_dfdp to only a specified set of state variables of interest.

Parameters:
  • y_list (list) – A list of state variables or named expressions

  • dsdp (csc_matrix) – A sensitivity matrix calculated by get_dsdp_dfdp

  • row_map (ComponentMap) – A row map from get_dsdp_dfdp

  • column_map (ComponentMap) – A column map from get_dsdp_dfdp, only needed if y_list contains expressions

Returns:

dy/dp and a new row map with only y variables

Return type:

csc_matrix, ComponentMap