check_components_descended_from_model

(function from pyomo.contrib.pyros.util)

pyomo.contrib.pyros.util.check_components_descended_from_model(model, components, components_name, config)[source]

Check all members in a provided sequence of Pyomo component objects are descended from a given ConcreteModel object.

Parameters:
  • model (ConcreteModel) – Model from which components should all be descended.

  • components (Iterable of Component) – Components of interest.

  • components_name (str) – Brief description or name for the sequence of components. Used for constructing error messages.

  • config (ConfigDict) – PyROS solver options.

Raises:

ValueError – If at least one entry of components is not descended from model.