Ignore:
Timestamp:
03/31/12 15:20:14 (2 years ago)
Author:
wehart
Message:

Migrating indexing logic from Objective and Constraint
into the IndexedComponent? base class.

Removed the ConstraintBase? class. This is not really used now,
and per John's suggestion the SOS and PieceWise? constraints should
be handled through transformations.

File:
1 edited

Legend:

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

    r5597 r5629  
    384384                entry = input_soln.objective[label] 
    385385                if obj_value.index.__class__ is tuple: 
    386                     tmp[(obj_value.obj().name,)+obj_value.index] = (obj_value.name, entry) 
    387                 else: 
    388                     tmp[(obj_value.obj().name,obj_value.index)] = (obj_value.name, entry) 
     386                    tmp[(obj_value.component().name,)+obj_value.index] = (obj_value.name, entry) 
     387                else: 
     388                    tmp[(obj_value.component().name,obj_value.index)] = (obj_value.name, entry) 
    389389            for key in sorted(tmp.keys()): 
    390390                value = tmp[key] 
     
    807807        for c in self.active_components(): 
    808808 
    809             # Get all subclasses of ConstraintBase 
    810             if issubclass(c, ConstraintBase): 
     809            # Get all subclasses of Constraint 
     810            if issubclass(c, Constraint): 
    811811                cons = self.active_components(c) 
    812812 
Note: See TracChangeset for help on using the changeset viewer.