File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
pyomo/core/plugins/transform Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2828 Constraint ,
2929 Objective ,
3030)
31+ from pyomo .core .base .block import SubclassOf
3132from pyomo .core .util import target_list
3233from pyomo .gdp import Disjunct
3334from pyomo .util .vars_from_expressions import get_vars_from_components
@@ -66,7 +67,7 @@ class RelaxIntegerVars(Transformation):
6667 doc = """
6768 This argument should be the reverse transformation token
6869 returned by a previous call to this transformation to transform
69- fixed disjunctive state in the given model.
70+ fixed discrete state in the given model.
7071 If this argument is specified, this call to the transformation
7172 will reverse what the transformation did in the call that returned
7273 the token. Note that if there are intermediate changes to the model
@@ -116,7 +117,7 @@ def __init__(self):
116117 super ().__init__ ()
117118
118119 def _apply_to (self , model , ** kwds ):
119- if not model .ctype in (Block , Disjunct ):
120+ if model .ctype not in SubclassOf (Block ):
120121 raise ValueError (
121122 "Transformation called on %s of type %s. 'model' "
122123 "must be a ConcreteModel or Block." % (model .name , model .ctype )
You can’t perform that action at this time.
0 commit comments