Changeset 5814


Ignore:
Timestamp:
May 26, 2012 4:19:30 PM (7 years ago)
Author:
wehart
Message:

Adding an error message when the RangeSet? object is not initialized
before being used.

File:
1 edited

Legend:

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

    r5705 r5814  
    117117
    118118    def __iter__(self):
     119        if not self._constructed:
     120            raise RuntimeError, "A RangeSet class must be initialized before a user can iterate over its elements."
    119121        if self.filter is None and self.validate is None:
    120122            #for i in itertools.islice(count(), (self._end_val-self._start_val+self._step_val+1e-7)//self._step_val):
Note: See TracChangeset for help on using the changeset viewer.