# ____________________________________________________________________________________
#
# Pyomo: Python Optimization Modeling Objects
# Copyright (c) 2008-2026 National Technology and Engineering Solutions of Sandia, LLC
# Under the terms of Contract DE-NA0003525 with National Technology and Engineering
# Solutions of Sandia, LLC, the U.S. Government retains certain rights in this
# software. This software is distributed under the 3-clause BSD License.
# ____________________________________________________________________________________
from functools import wraps
from pyomo.common.autoslots import AutoSlots
from pyomo.common.collections import ComponentMap, DefaultComponentMap
from pyomo.common.log import is_debug_set
from pyomo.common.modeling import unique_component_name
from pyomo.core.base import Transformation, TransformationFactory
from pyomo.core.base.external import ExternalFunction
from pyomo.core import (
Any,
Block,
BooleanVar,
Connector,
Constraint,
Expression,
NonNegativeIntegers,
Param,
RangeSet,
Reference,
Set,
SetOf,
Suffix,
Var,
)
from pyomo.gdp import Disjunct, Disjunction, GDP_Error
from pyomo.gdp.transformed_disjunct import _TransformedDisjunct
from pyomo.gdp.util import (
get_gdp_tree,
get_src_constraint,
get_src_disjunct,
get_src_disjunction,
get_transformed_constraints,
_warn_for_active_disjunct,
)
from pyomo.network import Port
from weakref import ref as weakref_ref
class _GDPTransformationData(AutoSlots.Mixin):
__slots__ = ('src_constraint', 'transformed_constraints')
def __init__(self):
self.src_constraint = ComponentMap()
self.transformed_constraints = DefaultComponentMap(list)
Block.register_private_data_initializer(_GDPTransformationData, scope='pyomo.gdp')