Changeset 3067


Ignore:
Timestamp:
Oct 3, 2010 9:23:58 AM (11 years ago)
Author:
wehart
Message:

Adding the AbstractModel? class.

File:
1 edited

Legend:

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

    r3066 r3067  
    99#  _________________________________________________________________________
    1010
    11 __all__ = ['Model', 'ConcreteModel']
     11__all__ = ['Model', 'ConcreteModel', 'AbstractModel']
    1212
    1313import array
     
    836836        self._defer_construction=False
    837837
    838     pyutilib.component.core.alias("ConcreteModel", 'Model with concrete '     \
    839               'expressions, which can be used as a component of other models.')
     838    pyutilib.component.core.alias("ConcreteModel", 'A concrete optimization model that '\
     839              'does not defer construction of components.')
     840
     841class AbstractModel(Model):
     842    """
     843    An abstract optimization model that defers construction of
     844    components.
     845    """
     846
     847    def __init__(self, *args, **kwds):
     848        Model.__init__(self, *args, **kwds)
     849        self._defer_construction=True
     850
     851    pyutilib.component.core.alias("AbstractModel", 'An abstract optimization model that '\
     852              'defers construction of components.')
     853
Note: See TracChangeset for help on using the changeset viewer.