Changeset 2130


Ignore:
Timestamp:
Jan 4, 2010 6:03:42 PM (11 years ago)
Author:
jwatson
Message:

Mirroring previous commit for singleton (non-indexed) parameters, allowing set via param[None].

File:
1 edited

Legend:

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

    r2046 r2130  
    159159           return
    160160
    161         if None in self._index:
     161        if (None in self._index) and (ndx is not None): # allow for None indexing if this is truly a singleton
    162162           raise KeyError, "Cannot set an array value in the simple parameter "+self.name
    163163        if ndx not in self._index:
Note: See TracChangeset for help on using the changeset viewer.