Skip to content

Commit

Permalink
Updating GDPopt call to _transform_constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
emma58 committed Mar 27, 2024
1 parent 0c25598 commit fe4a4e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyomo/contrib/gdpopt/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,13 @@ def _add_bigm_constraint_to_transformed_model(m, constraint, block):
# making a Reference to the ComponentData so that it will look like an
# indexed component for now. If I redesign bigm at some point, then this
# could be prettier.
bigm._transform_constraint(Reference(constraint), parent_disjunct, None, [], [])
bigm._transform_constraint(
Reference(constraint),
parent_disjunct,
None,
[],
[],
1 - parent_disjunct.binary_indicator_var,
)
# Now get rid of it because this is a class attribute!
del bigm._config

0 comments on commit fe4a4e0

Please sign in to comment.