Incidence Options

Configuration options for incidence graph generation

pyomo.contrib.incidence_analysis.config.IncidenceConfig = <pyomo.common.config.ConfigDict object>

Options for incidence graph generation

  • include_fixed – Flag indicating whether fixed variables should be included in the incidence graph

  • linear_only – Flag indicating whether only variables that participate linearly should be included.

  • method – Method used to identify incident variables. Must be a value of the IncidenceMethod enum.

  • _ampl_repn_visitor – Expression visitor used to generate AMPLRepn of each constraint. Must be an instance of AMPLRepnVisitor. This option is constructed automatically when needed and should not be set by users!

enum pyomo.contrib.incidence_analysis.config.IncidenceMethod(value)[source]

Methods for identifying variables that participate in expressions

Valid values are as follows:

identify_variables = <IncidenceMethod.identify_variables: 0>
standard_repn = <IncidenceMethod.standard_repn: 1>
standard_repn_compute_values = <IncidenceMethod.standard_repn_compute_values: 2>
ampl_repn = <IncidenceMethod.ampl_repn: 3>
pyomo.contrib.incidence_analysis.config.get_config_from_kwds(**kwds)[source]

Get an instance of IncidenceConfig from provided keyword arguments.

If the method argument is IncidenceMethod.ampl_repn and no AMPLRepnVisitor has been provided, a new AMPLRepnVisitor is constructed. This function should generally be used by callers such as IncidenceGraphInterface to ensure that a visitor is created then re-used when calling get_incident_variables in a loop.