Changeset 2843


Ignore:
Timestamp:
Jul 23, 2010 6:01:23 PM (9 years ago)
Author:
prsteel
Message:

SharedComponent? no longer inherits from Plugin. Import fixes.

Location:
coopr.pyomo/trunk/coopr/pyomo/base
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/base/PyomoModel.py

    r2841 r2843  
    2929import pyomo
    3030
    31 from component import Component
     31from component import *
    3232from sets import Set, _ProductSet, _SetContainer, _BaseSet
    3333from rangeset import RangeSet
     
    10381038            item = self.__dict__[i]
    10391039            if isfunction(item) or \
    1040                 isinstance(item, (int, long, float, bool, basestring)) \
     1040                isinstance(item, (int, long, float, bool, basestring)) or \
    10411041                isinstance(item, SharedComponent):
    10421042                dup.__dict__[i] = item
  • coopr.pyomo/trunk/coopr/pyomo/base/component.py

    r2841 r2843  
    11
    2 __all__ = ['Component']
     2__all__ = ['Component', "SharedComponent"]
    33
    44from pyutilib.component.core import Plugin, implements
     
    3333        pass
    3434
    35 class SharedComponent(Plugin):
     35
     36class SharedComponent(object):
    3637    """
    3738    Component to be shared between Model objects.
     
    7273    """
    7374
    74     implements(ISharedModelComponent)
    75 
    7675    def __deepcopy__(self, memo={}):
    7776        """
  • coopr.pyomo/trunk/coopr/pyomo/base/param.py

    r2841 r2843  
    1414import types
    1515
    16 from component import Component
     16from component import *
    1717from coopr.pyomo.base.numvalue import *
    1818from indexed_component import IndexedComponent
  • coopr.pyomo/trunk/coopr/pyomo/base/plugin.py

    r2841 r2843  
    158158
    159159
    160 class ISharedModelComponent(Iterface):
    161 
    162     def __deepcopy__(self, memo={}):
    163         pass
    164 
    165160ModelComponentFactory = CreatePluginFactory(IModelComponent)
    166161
Note: See TracChangeset for help on using the changeset viewer.