The easiest way is:
import pyomo.environ as pyo
for obj in m1.component_data_objects(pyo.Objective):
print(f'objective name: "{obj}" deactivated.')
obj.deactivate()
john
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pyomo-forum...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyomo-forum/15514c1d-9997-496a-b291-b39e31cff5d6n%40googlegroups.com.