solve_strongly_connected_components
(function from pyomo.contrib.incidence_analysis.scc_solver
)
- pyomo.contrib.incidence_analysis.scc_solver.solve_strongly_connected_components(block, *, solver=None, solve_kwds=None, use_calc_var=True, calc_var_kwds=None)[source]
Solve a square system of variables and equality constraints by solving strongly connected components individually.
Strongly connected components (of the directed graph of constraints obtained from a perfect matching of variables and constraints) are the diagonal blocks in a block triangularization of the incidence matrix, so solving the strongly connected components in topological order is sufficient to solve the entire block.
One-by-one blocks are solved using Pyomo’s calculate_variable_from_constraint function, while higher-dimension blocks are solved using the user-provided solver object.
- Parameters:
block (Pyomo Block) – The Pyomo block whose variables and constraints will be solved
solver (Pyomo solver object) – The solver object that will be used to solve strongly connected components of size greater than one constraint. Must implement a solve method.
solve_kwds (Dictionary) – Keyword arguments for the solver’s solve method
use_calc_var (Bool) – Whether to use
calculate_variable_from_constraint
for one-by-one square system solvescalc_var_kwds (Dictionary) – Keyword arguments for calculate_variable_from_constraint
- Return type:
List of results objects returned by each call to solve