Changeset 9485


Ignore:
Timestamp:
Dec 14, 2014 3:34:49 PM (4 years ago)
Author:
wehart
Message:

Fixes to push bounds changes into all
variable data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyomo/trunk/pyomo/core/plugins/transform/relax_integrality.py

    r9475 r9485  
    2020    """
    2121
    22     alias('base.relax_integrality', "Create a model where integer variables are replaced with real variables.")
     22    alias('base.relax_integrality',\
     23          doc="Create a model where integer variables are replaced with real variables.")
    2324
    2425    def __init__(self, **kwds):
     
    6162                continue
    6263
    63             bnd = var.bounds
     64            bnd = var.domain.bounds()
    6465            if bnd is None:
    6566                bnd = ( None, None )
     
    6869                    self._tightenBound(bnd[1], dbnd[1], min) )
    6970            if bnd == (None, None):
    70                 var.bounds = None
     71                var.domain._bounds = None
    7172            else:
    72                 var.bounds = bnd
     73                var.domain._bounds = bnd
     74            var._initialize_members(var._index)
     75
    7376        return M
    7477
Note: See TracChangeset for help on using the changeset viewer.