Ignore:
Timestamp:
12/06/09 15:00:00 (4 years ago)
Author:
wehart
Message:

Creating the ComponentBase? class, which manages the initialization of
components. This consolidates the mechanism needed to generalize
the component indexing operations.

File:
1 edited

Legend:

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

    r1966 r1967  
    8282    def _add_temporary_set(self,val): 
    8383        if val._index_set is not None: 
    84            ##print "HERE Y1" 
    85            val._index = self._construct_temporary_set(val._index_set,val.name+"_index") 
     84            ctr=0 
     85            for tset in val._index_set: 
     86                if tset.name == "_unknown_": 
     87                    self._construct_temporary_set(tset,val.name+"_index_"+str(ctr)) 
     88                ctr+=1 
     89            val._index = self._construct_temporary_set(val._index_set,val.name+"_index") 
    8690        if isinstance(val._index,_SetContainer) and \ 
    87            val._index.name == "_unknown_": 
    88            ##print "HERE Y2" 
    89            self._construct_temporary_set(val._index,val.name+"_index") 
     91            val._index.name == "_unknown_": 
     92            self._construct_temporary_set(val._index,val.name+"_index") 
    9093        if val.domain is not None and val.domain.name == "_unknown_": 
    91            ##print "HERE Y3" 
    92            self._construct_temporary_set(val.domain,val.name+"_domain") 
     94            self._construct_temporary_set(val.domain,val.name+"_domain") 
    9395 
    9496 
Note: See TracChangeset for help on using the changeset viewer.