Hull_Reformulation

(class from pyomo.gdp.plugins.hull)

class pyomo.gdp.plugins.hull.Hull_Reformulation[source]

Bases: GDP_to_MIP_Transformation

Relax disjunctive model by forming the hull reformulation.

Relaxes a disjunctive model into an algebraic model by forming the hull reformulation of each disjunction.

This transformation accepts the following keyword arguments:

The transformation will create a new Block with a unique name beginning “_pyomo_gdp_hull_reformulation”. It will contain an indexed Block named “relaxedDisjuncts” that will hold the relaxed disjuncts. This block is indexed by an integer indicating the order in which the disjuncts were relaxed. All transformed Disjuncts will have a pointer to the block their transformed constraints are on, and all transformed Disjunctions will have a pointer to the corresponding OR or XOR constraint.

Parameters:
  • perspective_function (str) – The perspective function used for the disaggregated variables. Must be one of ‘FurmanSawayaGrossmann’ (default), ‘LeeGrossmann’, or ‘GrossmannLee’

  • EPS (float) – The value to use for epsilon [default: 1e-4]

  • exact_hull_quadratic (bool) – If True, quadratic constraints (polynomial degree 2) are reformulated using the exact hull instead of the standard perspective function, following Gusev & Bernal Neira (2025) [4]_. Convex quadratics are handled with a conic reformulation (rotated second-order cone), while non-convex quadratics and equalities use the general exact hull reformulation. Convexity is determined via eigenvalue decomposition of the Hessian matrix. Important: unlike most GDP transformations, coefficients are taken from a quadratic representation that evaluates mutable Param components to numeric values at transformation time. The reformulated constraints do not stay algebraically tied to those Params; changing a mutable Param after transformation does not update the relaxation. Set parameter values before transforming, or use immutable Params, if you need that linkage. [default: False]

  • eigenvalue_tolerance (float) – Numerical tolerance for eigenvalue-based positive/negative semi-definite checks when using the exact hull reformulation for quadratic constraints (exact_hull_quadratic=True). An eigenvalue \(\lambda\) is treated as non-negative if \(\lambda >= -\text{eigenvalue_tolerance}\) and as non-positive if \(\lambda <= \text{eigenvalue_tolerance}\) (i.e., eigenvalues in [-eigenvalue_tolerance, eigenvalue_tolerance] are treated as zero). Increasing this value makes the convexity check more permissive; decreasing it makes it more conservative. [default: 1e-10]

  • targets (block, disjunction, or list of those types) – The targets to transform. This can be a block, disjunction, or a list of blocks and Disjunctions [default: the instance]

  • well_defined_points (dict-like of ComponentMaps) – Base points used for handling of functions with restricted domain. See the generated documentation of the config option for full details.

  • well_defined_points_heuristic_solver (Solver object supporting v1 api) – or corresponding string [default: ‘gurobi_direct_minlp’] Solver used to search for a base point when constraints are not well-defined at zero. Must be a MINLP solver in general. Override using ‘well_defined_points’

__init__()[source]

Initialize transformation object.

Methods

__init__()

Initialize transformation object.

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

get_disaggregated_var(v, disjunct[, ...])

Returns the disaggregated variable corresponding to the Var v and the Disjunct disjunct.

get_disaggregation_constraint(original_var, ...)

Returns the disaggregation (re-aggregation?) constraint (which links the disaggregated variables to their original) corresponding to original_var and the transformation of disjunction.

get_exact_quadratic_aux_var(cons)

Return the conic exact-hull auxiliary variable for cons.

get_src_constraint()

Return the original Constraint whose transformed counterpart is transformedConstraint

get_src_disjunct()

Return the Disjunct object whose transformed components are on transBlock.

get_src_disjunction()

Return the Disjunction corresponding to xor_constraint

get_src_var(disaggregated_var)

Returns the original model variable to which disaggregated_var corresponds.

get_transformed_constraints(cons)

Return the transformed version of srcConstraint

get_var_bounds_constraint(v[, disjunct])

Returns a dictionary mapping keys 'lb' and/or 'ub' to the Constraints that set a disaggregated variable to be within its lower and upper bounds (respectively) when its Disjunct is active and to be 0 otherwise.

get_well_defined_points_map(b)

Retrieve the well-defined points originally used to transform a Block.

Attributes

CONFIG

transformation_name

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

get_disaggregated_var(v, disjunct, raise_exception=True)[source]

Returns the disaggregated variable corresponding to the Var v and the Disjunct disjunct.

If v is a local variable, this method will return v.

Parameters:
  • v (a Var that appears in a constraint in a transformed Disjunct)

  • disjunct (a transformed Disjunct in which v appears)

get_disaggregation_constraint(original_var, disjunction, raise_exception=True)[source]

Returns the disaggregation (re-aggregation?) constraint (which links the disaggregated variables to their original) corresponding to original_var and the transformation of disjunction.

Parameters:
  • original_var (a Var which was disaggregated in the transformation) – of Disjunction disjunction

  • disjunction (a transformed Disjunction containing original_var)

get_exact_quadratic_aux_var(cons)[source]

Return the conic exact-hull auxiliary variable for cons.

Parameters:

cons (ConstraintData) – Original constraint on a Disjunct that may have been reformulated using the conic exact hull.

Returns:

The auxiliary nonnegative t variable introduced by the conic exact hull for cons, or None if that reformulation was not used for cons.

Return type:

Var or None

get_src_constraint()

Return the original Constraint whose transformed counterpart is transformedConstraint

Parameters:
  • transformedConstraint (Constraint, which must be a component on one of)

  • of (the BlockDatas in the relaxedDisjuncts Block)

  • block (a transformation)

get_src_disjunct()

Return the Disjunct object whose transformed components are on transBlock.

Parameters:

transBlock (BlockData which is in the relaxedDisjuncts IndexedBlock) – on a transformation block.

get_src_disjunction()

Return the Disjunction corresponding to xor_constraint

Parameters:

xor_constraint (Constraint, which must be the logical constraint) – (located on the transformation block) of some Disjunction

get_src_var(disaggregated_var)[source]

Returns the original model variable to which disaggregated_var corresponds.

Parameters:

disaggregated_var (a Var that was created by the hull) – transformation as a disaggregated variable (and so appears on a transformation block of some Disjunct)

get_transformed_constraints(cons)[source]

Return the transformed version of srcConstraint

Parameters:
get_var_bounds_constraint(v, disjunct=None)[source]

Returns a dictionary mapping keys ‘lb’ and/or ‘ub’ to the Constraints that set a disaggregated variable to be within its lower and upper bounds (respectively) when its Disjunct is active and to be 0 otherwise.

Parameters:
  • v (a Var that was created by the hull transformation as a) – disaggregated variable (and so appears on a transformation block of some Disjunct)

  • disjunct ((For nested Disjunctions) Which Disjunct in the) – hierarchy the bounds Constraint should correspond to. Optional since for non-nested models this can be inferred.

get_well_defined_points_map(b)[source]

Retrieve the well-defined points originally used to transform a Block. Format is a dict of ComponentMaps identical to that of the parameter well_defined_points.

Parameters:

b (a Block that was transformed by gdp.hull)