Changeset 3051


Ignore:
Timestamp:
Sep 28, 2010 3:58:10 PM (11 years ago)
Author:
jwatson
Message:

Fixed error in implementation of last() method of SetContainer?.

File:
1 edited

Legend:

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

    r3041 r3051  
    423423        if self.virtual:
    424424            raise TypeError, "Cannot access the last element of virtual set `"+self.name+"'"
    425         return self.member(-1)
     425        return self.member(len(self.value))
    426426
    427427    def __getitem__(self, key):
Note: See TracChangeset for help on using the changeset viewer.