Source code for pyomo.core.plugins.transform.hierarchy

#  ___________________________________________________________________________
#
#  Pyomo: Python Optimization Modeling Objects
#  Copyright (c) 2008-2024
#  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 pyomo.core.base import Transformation


[docs] class AbstractTransformation(Transformation): """ Base class for all model transformations that produce abstract models. """
[docs] def __init__(self, **kwds): kwds["name"] = kwds.get("name", "abstract_transformation") super(AbstractTransformation, self).__init__(**kwds)
[docs] class ConcreteTransformation(Transformation): """ Base class for all model transformations that produce concrete models. """
[docs] def __init__(self, **kwds): kwds["name"] = kwds.get("name", "concrete_transformation") super(ConcreteTransformation, self).__init__(**kwds)
[docs] class IsomorphicTransformation(Transformation): """ Base class for 'lossless' transformations for which a bijective mapping between optimal variable values and the optimal cost exists. """
[docs] def __init__(self, **kwds): kwds["name"] = kwds.get("name", "isomorphic_transformation") super(IsomorphicTransformation, self).__init__(**kwds)
[docs] class LinearTransformation(Transformation): """Base class for all linear model transformations."""
[docs] def __init__(self, **kwds): kwds["name"] = kwds.get("name", "linear_transform") super(LinearTransformation, self).__init__(**kwds)
[docs] class NonIsomorphicTransformation(Transformation): """ Base class for 'lossy' transformations for which a bijective mapping between optimal variable values and the optimal cost does not exist. """
[docs] def __init__(self, **kwds): kwds["name"] = kwds.get("name", "isomorphic_transformation") super(NonIsomorphicTransformation, self).__init__(**kwds)
[docs] class NonlinearTransformation(Transformation): """Base class for all nonlinear model transformations."""
[docs] def __init__(self, **kwds): kwds["name"] = kwds.get("name", "nonlinear_transform") super(NonlinearTransformation, self).__init__(**kwds)