ModelData

(class from pyomo.contrib.pyros.util)

class pyomo.contrib.pyros.util.ModelData(original_model, config, timing)[source]

Bases: object

Container for modeling objects from which the PyROS subproblems are constructed.

Parameters:
  • original_model (ConcreteModel) – Original user-provided model.

  • timing (TimingData) – Main timing data object.

original_model

Original user-provided model.

Type:

ConcreteModel

timing

Main PyROS solver timing data object.

Type:

TimingData

working_model

Preprocessed clone of original_model from which the PyROS cutting set subproblems are to be constructed.

Type:

ConcreteModel

separation_priority_order

Mapping from constraint names to separation priority values.

Type:

dict

separation_priority_suffix_finder

Object for resolving active Suffix components added to the model by the user as a means of prioritizing separation problems mapped to second-stage inequality constraints.

Type:

SuffixFinder

__init__(original_model, config, timing)[source]

Methods

__init__(original_model, config, timing)

get_user_separation_priority(component_data, ...)

Infer user specification for the separation priority/priorities of the second-stage inequality constraint/constraints derived from a given component data attribute of the working model.

preprocess(user_var_partitioning)

Preprocess model data.

Member Documentation

get_user_separation_priority(component_data, component_data_name)[source]

Infer user specification for the separation priority/priorities of the second-stage inequality constraint/constraints derived from a given component data attribute of the working model.

Parameters:
  • component_data (ComponentData) – Component data from which the inequality constraints are meant to be derived.

  • component_data_name (str) – Name of the component data object as it is expected to appear in self.config.separation_priority_order.

Returns:

Priority of the derived constraint(s).

Return type:

numeric type or None

Notes

The separation priorities for the constraints derived from component_data are inferred from either the active Suffix components of self.working_model with name ‘pyros_separation_priority’ or from self.config.separation_priority. Priorities specified through the active Suffix components take precedence over priorities specified through self.config.separation_priority_order. Moreover, priorities are inferred from Suffix components using the Pyomo SuffixFinder.

preprocess(user_var_partitioning)[source]

Preprocess model data.

See preprocess_model_data().

Returns:

True if robust infeasibility detected, False otherwise.

Return type:

bool