Changeset 2122


Ignore:
Timestamp:
Jan 3, 2010 1:44:52 AM (11 years ago)
Author:
wehart
Message:

Adding methods to clear objective/constraint data.

File:
1 edited

Legend:

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

    r2099 r2122  
    8080        self.rule = tmprule
    8181
     82    def clear(self):
     83        self._data = {}
     84       
    8285    def __call__(self, exception=True):
    8386        if len(self._data) == 0:
     
    236239            self._data[None].name=tmpname
    237240        self.rule = tmprule
     241
     242    def clear(self):
     243        self._data = {}
    238244
    239245    def __call__(self, exception=True):
Note: See TracChangeset for help on using the changeset viewer.