Incidence Options

Configuration options for incidence graph generation

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

Methods for identifying variables that participate in expressions

identify_variables = 0

Use pyomo.core.expr.visitor.identify_variables

standard_repn = 1

Use pyomo.repn.standard_repn.generate_standard_repn

standard_repn_compute_values = 2

Use pyomo.repn.standard_repn.generate_standard_repn with compute_values=True

ampl_repn = 3

Use pyomo.repn.ampl.AMPLRepnVisitor

enum pyomo.contrib.incidence_analysis.config.IncidenceOrder(value)[source]
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.

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!