Changeset 9503


Ignore:
Timestamp:
Dec 19, 2014 4:26:14 PM (4 years ago)
Author:
jdsiiro
Message:

Update to GDP so that importing pyomo.gdp.bigm or pyomo.gdp.chull
registers and activates the respective transformations with the pyomo script.

Location:
pyomo/trunk/pyomo/gdp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pyomo/trunk/pyomo/gdp/__init__.py

    r9465 r9503  
    1313
    1414from pyomo.gdp.disjunct import GDP_Error, Disjunct, Disjunction
    15 import pyomo.gdp.bigm
    16 import pyomo.gdp.chull
     15
     16# Do not import these files: importing them registers the transformation
     17# plugins with the pyomo script so that they get automatically invoked.
     18#import pyomo.gdp.bigm
     19#import pyomo.gdp.chull
    1720
    1821PluginGlobals.pop_env()
  • pyomo/trunk/pyomo/gdp/bigm.py

    r9247 r9503  
    1515class BigM_Transformation_Plugin(Plugin):
    1616
    17     implements(IPyomoScriptModifyInstance)
     17    implements(IPyomoScriptModifyInstance, service=True)
    1818
    1919    def apply(self, **kwds):
  • pyomo/trunk/pyomo/gdp/chull.py

    r9247 r9503  
    1515class ConvexHull_Transformation_Plugin(Plugin):
    1616
    17     implements(IPyomoScriptModifyInstance)
     17    implements(IPyomoScriptModifyInstance, service=True)
    1818
    1919    def apply(self, **kwds):
Note: See TracChangeset for help on using the changeset viewer.