Changeset 1976


Ignore:
Timestamp:
Dec 8, 2009 6:49:14 PM (11 years ago)
Author:
wehart
Message:

A hack to make the default 'dimen' be 1 when computing the
ndim for a index set.

File:
1 edited

Legend:

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

    r1967 r1976  
    3939                self._ndim = 0
    4040                for iset in self._index_set:
     41                    # This is a hack.  We should be able to specify that a set's dimension is unknown.  However,
     42                    # the parser seems to need this right now.
    4143                    if iset.dimen is None:
    42                         self._ndim = None
    43                         return
    44                     self._ndim += iset.dimen
     44                        self._ndim += 1
     45                        #self._ndim = None
     46                        #return
     47                    else:
     48                        self._ndim += iset.dimen
    4549
Note: See TracChangeset for help on using the changeset viewer.