Changeset 4968


Ignore:
Timestamp:
09/28/11 13:22:11 (3 years ago)
Author:
jwatson
Message:

Changing the exception raised when a block is re-assigned to a new parent model to simply a warning. No ill effects immediately observed. In PySP, blocks (scenario instances) can be members of both a bundle - a mini-ef - and the full extensive form.

File:
1 edited

Legend:

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

    r4947 r4968  
    475475                # careful about checking that this actually works, 
    476476                # complain loudly. 
    477                 raise Exception, "Reassigning a block attached to a model" 
     477                print "WARNING: Reassigning a block attached to a model" 
    478478            # NB: use __dict__ directly to prevent infinite recursion 
    479479            val.__dict__['parent'] = weakref.ref(self) 
Note: See TracChangeset for help on using the changeset viewer.