PartitionDisjuncts_Transformation

(class from pyomo.gdp.plugins.partition_disjuncts)

class pyomo.gdp.plugins.partition_disjuncts.PartitionDisjuncts_Transformation[source]

Bases: Transformation

Transform disjunctive model to equivalent disjunctive model (with potentially tighter hull relaxation) by taking the “P-split” formulation from Kronqvist et al. 2021 [KMT21]. In each Disjunct, convex and additively separable constraints are split into separate constraints by introducing auxiliary variables that upperbound the subexpressions created by the split. Increasing the number of partitions can result in tighter hull relaxations, but at the cost of larger model sizes.

The transformation will create a new Block with a unique name beginning “_pyomo_gdp_partition_disjuncts_reformulation”. The Block will have new Disjunct objects, each corresponding to one of the Disjuncts being transformed. These will have the transformed constraints on them, and be in new Disjunctions, each corresponding to one of the originals. In addition, the auxiliary variables and the partitioned constraints will be declared on this Block, as well as LogicalConstraints linking the original indicator_vars with the ones of the transformed Disjuncts. All original GDP components that were transformed will be deactivated.

References

See [KMT21].

Keyword Arguments:
  • targets (target_list, optional) –

    Specifies the target or list of targets to relax as either a component or a list of components.

    If None (default), the entire model is transformed. Note that if the transformation is done out of place, the list of targets should be attached to the model before it is cloned, and the list will specify the targets on the cloned instance.

  • variable_partitions (_to_dict, optional) –

    Specified variable partitions, either globally or per Disjunction.

    Expects either a set of disjoint ComponentSets whose union is all the variables that appear in all Disjunctions or a mapping from each active Disjunction to a set of disjoint ComponentSets whose union is the set of variables that appear in that Disjunction. In either case, if any constraints in the Disjunction are only partially additively separable, these sets must be a valid partition so that these constraints are additively separable with respect to this partition. To specify a default partition for Disjunctions that do not appear as keys in the map, map the partition to ‘None.’

    Last, note that in the case of constraints containing partially additively separable functions, it is required that the user specify the variable partition(s).

  • num_partitions (_to_dict, optional) –

    Either a single value so that all Disjunctions will have variables partitioned into P sets, or a map of Disjunctions to a value of P for each active Disjunction. Mapping None to a value of P will specify the default value of P to use if the value for a given Disjunction is not explicitly specified.

    Note that if any constraints contain partially additively separable functions, the partitions for the Disjunctions with these Constraints must be specified in the variable_partitions argument.

  • variable_partitioning_method (_to_dict, default=<function arbitrary_partition at 0x737ae63ad800>) –

    A function which takes a Disjunction object and a number P and return a valid partitioning of the variables that appear in the disjunction into P partitions.

    Note that you must give a value for ‘P’ if you are using this method to calculate partitions.

    Note that if any constraints contain partially additively separable functions, the partitions for the Disjunctions cannot be calculated automatically. Please specify the partitions for the Disjunctions with these Constraints in the variable_partitions argument.

  • assume_fixed_vars_permanent (bool, default=False) –

    If True, the transformation will create a correct model even if fixed variables are later unfixed. That is, bounds will be calculated based on fixed variables’ bounds, not their values. However, if fixed variables will never be unfixed, a possibly tighter model will result, and fixed variables need not have bounds.

    Note that this has no effect on fixed BooleanVars, including the indicator variables of Disjuncts. The transformation is always correct whether or not these remain fixed.

  • compute_bounds_method (default=<function compute_fbbt_bounds at 0x737ae63ad940>) –

    Callback for computing bounds on expressions, in order to bound the auxiliary variables created by the transformation.

    Some pre-implemented options include

    • compute_fbbt_bounds (the default), and

    • compute_optimal_bounds

    or you can write your own callback which accepts an Expression object, a model containing the variables and global constraints of the original instance, and a configured solver and returns a tuple (LB, UB) where either element can be None if no valid bound could be found.

  • compute_bounds_solver (optional) –

    Configured solver object for use in the compute_bounds_method.

    In particular, if compute_bounds_method is ‘compute_optimal_bounds’, this will be used to solve the subproblems, so needs to handle non- convex problems if any Disjunctions contain nonlinear constraints.

__init__()[source]

Methods

__init__()

apply(model, **kwds)

DEPRECATED.

apply_to(model, **kwds)

Apply the transformation to the given model.

create_using(model, **kwds)

Create a new model with this transformation

Attributes

CONFIG

Member Documentation

apply(model, **kwds)

DEPRECATED.

Deprecated since version 4.3.11323: Transformation.apply() has been deprecated. Please use either Transformation.apply_to() for in-place transformations or Transformation.create_using() for transformations that create a new, independent transformed model instance.

apply_to(model, **kwds)

Apply the transformation to the given model.

create_using(model, **kwds)

Create a new model with this transformation