Changeset 2208


Ignore:
Timestamp:
Jan 30, 2010 12:49:33 AM (9 years ago)
Author:
wehart
Message:

Merged revisions 2194-2207 via svnmerge from
https://software.sandia.gov/svn/public/coopr/coopr.pyomo/trunk

........

r2201 | wehart | 2010-01-29 17:38:14 -0700 (Fri, 29 Jan 2010) | 2 lines


Update to Coopr to account for changes in PyUtilib? package names.

........

Location:
coopr.pyomo/stable/2.2
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/stable/2.2

  • coopr.pyomo/stable/2.2/coopr/pyomo/__init__.py

    r2054 r2208  
    99#  _________________________________________________________________________
    1010
    11 import pyutilib.plugin.core
     11import pyutilib.component.core
    1212
    1313
    14 pyutilib.plugin.core.PluginGlobals.push_env( 'coopr.pyomo' )
     14pyutilib.component.core.PluginGlobals.push_env( 'coopr.pyomo' )
    1515
    1616from base import *
     
    2323import transform
    2424
    25 pyutilib.plugin.core.PluginGlobals.pop_env()
     25pyutilib.component.core.PluginGlobals.pop_env()
    2626
    2727
  • coopr.pyomo/stable/2.2/coopr/pyomo/base/PyomoModel.py

    r2194 r2208  
    1616from numvalue import *
    1717
    18 import pyutilib.plugin.core
     18import pyutilib.component.core
    1919from pyutilib.math import *
    2020from pyutilib.misc import quote_split, tuplize, Container
     
    3939    """
    4040
    41     presolver_ep = pyutilib.plugin.core.ExtensionPoint(IPyomoPresolver)
     41    presolver_ep = pyutilib.component.core.ExtensionPoint(IPyomoPresolver)
    4242
    4343
     
    4949        #
    5050        self._component={}
    51         for item in pyutilib.plugin.core.ExtensionPoint(IModelComponent):
     51        for item in pyutilib.component.core.ExtensionPoint(IModelComponent):
    5252            self._component[ item.cls() ] = {}
    5353        #
     
    469469        #
    470470        items = [Set, RangeSet, Param, Var, Objective, Constraint]
    471         for item in pyutilib.plugin.core.ExtensionPoint(IModelComponent):
     471        for item in pyutilib.component.core.ExtensionPoint(IModelComponent):
    472472            if not item in items:
    473473                items.append(item)
  • coopr.pyomo/stable/2.2/coopr/pyomo/base/expr.py

    r1975 r2208  
    1414
    1515from plugin import *
    16 from pyutilib.plugin.core import *
     16from pyutilib.component.core import *
    1717from numvalue import *
    1818from param import _ParamBase
  • coopr.pyomo/stable/2.2/coopr/pyomo/base/numvalue.py

    r2052 r2208  
    1212
    1313import plugin
    14 #import pyutilib.plugin.core
     14#import pyutilib.component.core
    1515import pyutilib.math
    1616import sys
  • coopr.pyomo/stable/2.2/coopr/pyomo/base/plugin.py

    r2002 r2208  
    1616        'apply_transformation']
    1717
    18 from pyutilib.plugin.core import *
     18from pyutilib.component.core import *
    1919
    2020
  • coopr.pyomo/stable/2.2/coopr/pyomo/base/pyomo.py

    r2194 r2208  
    1010
    1111from pyutilib.enum import Enum
    12 import pyutilib.plugin.core
     12import pyutilib.component.core
    1313from plugin import *
    1414
     
    5656
    5757def model_components():
    58     ep = pyutilib.plugin.core.ExtensionPoint(IModelComponent)
     58    ep = pyutilib.component.core.ExtensionPoint(IModelComponent)
    5959    ans = []
    6060    for item in ep:
  • coopr.pyomo/stable/2.2/coopr/pyomo/base/set_types.py

    r2005 r2208  
    1111__all__ = ['_VirtualSet', '_AnySet', 'RealSet', 'IntegerSet', 'BooleanSet', 'Any', 'Reals', 'PositiveReals', 'NonPositiveReals', 'NegativeReals', 'NonNegativeReals', 'PercentFraction', 'Integers', 'PositiveIntegers', 'NonPositiveIntegers', 'NegativeIntegers', 'NonNegativeIntegers', 'Boolean', 'Binary']
    1212
    13 import pyutilib.plugin.core
     13import pyutilib.component.core
    1414import sets
    1515from coopr.pyomo.base.plugin import *
     
    1818_virtual_sets = []
    1919
    20 class _VirtualSet(sets._SetContainer, pyutilib.plugin.core.Plugin):
     20class _VirtualSet(sets._SetContainer, pyutilib.component.core.Plugin):
    2121    """
    2222    A set that does not contain elements, but instead overrides the
     
    2424    """
    2525
    26     pyutilib.plugin.core.implements(IPyomoSet)
     26    pyutilib.component.core.implements(IPyomoSet)
    2727
    2828    def __init__(self,*args,**kwds):
    2929        if "name" in kwds:
    30             pyutilib.plugin.core.Plugin.__init__(self,name=kwds["name"])
     30            pyutilib.component.core.Plugin.__init__(self,name=kwds["name"])
    3131        else:
    32             pyutilib.plugin.core.Plugin.__init__(self)
     32            pyutilib.component.core.Plugin.__init__(self)
    3333        self._class_override=False
    3434        sets._SetContainer.__init__(self,*args,**kwds)
  • coopr.pyomo/stable/2.2/coopr/pyomo/base/sets.py

    r2194 r2208  
    1111__all__ = ['Set', '_BaseSet', '_SetContainer', '_SetArray', '_ProductSet', 'set_options']
    1212
    13 import pyutilib.plugin.core
     13import pyutilib.component.core
    1414from coopr.pyomo.base.plugin import ComponentRegistration
    1515from component import Component
     
    1919import copy
    2020
    21 log = pyutilib.plugin.core.PluginGlobals.env().log
     21log = pyutilib.component.core.PluginGlobals.env().log
    2222
    2323#
  • coopr.pyomo/stable/2.2/coopr/pyomo/expr/canonical_repn.py

    r2194 r2208  
    1111__all__ = ['generate_canonical_repn', 'as_expr', 'is_constant', 'is_linear', 'is_quadratic', 'is_nonlinear']
    1212
    13 import pyutilib.plugin.core
     13#import pyutilib.component.core
    1414from coopr.pyomo.base import IPyomoPresolver, IPyomoPresolveAction, Model
    1515from coopr.pyomo.base import expr
  • coopr.pyomo/stable/2.2/coopr/pyomo/presolve/collect_linear_terms.py

    r2194 r2208  
    1010
    1111
    12 import pyutilib.plugin.core
     12import pyutilib.component.core
    1313from coopr.pyomo.base import expr, Var, Constraint, Objective
    1414from coopr.pyomo.base.numvalue import NumericConstant
     
    2020
    2121
    22 class CollectLinearTerms(pyutilib.plugin.core.SingletonPlugin):
     22class CollectLinearTerms(pyutilib.component.core.SingletonPlugin):
    2323    """
    2424    This plugin processes a Pyomo Model instance to collect
     
    2626    """
    2727
    28     pyutilib.plugin.core.implements(IPyomoPresolveAction)
     28    pyutilib.component.core.implements(IPyomoPresolveAction)
    2929
    3030    def __init__(self, **kwds):
    3131        kwds['name'] = "collect_linear_terms"
    32         pyutilib.plugin.core.Plugin.__init__(self, **kwds)
     32        pyutilib.component.core.Plugin.__init__(self, **kwds)
    3333
    3434    def rank(self):
  • coopr.pyomo/stable/2.2/coopr/pyomo/presolve/compute_canonical_repn.py

    r2194 r2208  
    1313#
    1414
    15 import pyutilib.plugin.core
     15import pyutilib.component.core
    1616from coopr.pyomo.base import Constraint, Objective
    1717from coopr.pyomo.base import IPyomoPresolver, IPyomoPresolveAction
     
    1919
    2020
    21 class ComputeCanonicalRepn(pyutilib.plugin.core.SingletonPlugin):
     21class ComputeCanonicalRepn(pyutilib.component.core.SingletonPlugin):
    2222    """
    2323    This plugin computes the canonical representation for
     
    2626    """
    2727
    28     pyutilib.plugin.core.implements(IPyomoPresolveAction)
     28    pyutilib.component.core.implements(IPyomoPresolveAction)
    2929
    3030    def __init__(self, **kwds):
    3131        kwds['name'] = "compute_canonical_repn"
    32         pyutilib.plugin.core.Plugin.__init__(self, **kwds)
     32        pyutilib.component.core.Plugin.__init__(self, **kwds)
    3333
    3434    def rank(self):
  • coopr.pyomo/stable/2.2/coopr/pyomo/presolve/generic_varlabels.py

    r2096 r2208  
    1010
    1111from coopr.pyomo.base import IPyomoPresolver, IPyomoPresolveAction, Var, Constraint, Objective
    12 import pyutilib.plugin.core
     12import pyutilib.component.core
    1313
    1414ignore = set(['"', "'", '`'])
     
    4444remap['~']='_Q126_'
    4545
    46 class GenericVarLabelsPresolver(pyutilib.plugin.core.SingletonPlugin):
     46class GenericVarLabelsPresolver(pyutilib.component.core.SingletonPlugin):
    4747    """
    4848    This plugin changes variables names to generate a label that
     
    5050    """
    5151
    52     pyutilib.plugin.core.implements(IPyomoPresolveAction)
     52    pyutilib.component.core.implements(IPyomoPresolveAction)
    5353
    5454    def __init__(self, **kwds):
    5555        kwds['name'] = "generic_varlabels"
    56         pyutilib.plugin.core.Plugin.__init__(self, **kwds)
     56        pyutilib.component.core.Plugin.__init__(self, **kwds)
    5757
    5858    def rank(self):
  • coopr.pyomo/stable/2.2/coopr/pyomo/presolve/identify_vars.py

    r2064 r2208  
    1010
    1111
    12 import pyutilib.plugin.core
     12import pyutilib.component.core
    1313from coopr.pyomo.base import expr, _VarBase, Var, Constraint, Objective
    1414from coopr.pyomo.base.var import _VarValue, VarStatus
     
    1717
    1818
    19 class IdentifyVariablesPresolver(pyutilib.plugin.core.SingletonPlugin):
     19class IdentifyVariablesPresolver(pyutilib.component.core.SingletonPlugin):
    2020    """
    2121    This plugin processes a Pyomo Model instance to define
     
    2323    """
    2424
    25     pyutilib.plugin.core.implements(IPyomoPresolveAction)
     25    pyutilib.component.core.implements(IPyomoPresolveAction)
    2626
    2727    def __init__(self, **kwds):
    2828        kwds['name'] = "identify_variables"
    29         pyutilib.plugin.core.Plugin.__init__(self, **kwds)
     29        pyutilib.component.core.Plugin.__init__(self, **kwds)
    3030
    3131    def rank(self):
  • coopr.pyomo/stable/2.2/coopr/pyomo/presolve/numeric_varlabels.py

    r1768 r2208  
    99#  _________________________________________________________________________
    1010
    11 import pyutilib.plugin.core
     11import pyutilib.component.core
    1212from coopr.pyomo.base import IPyomoPresolver, IPyomoPresolveAction
    1313
    1414
    15 class NumericVarLabelsPresolver(pyutilib.plugin.core.SingletonPlugin):
     15class NumericVarLabelsPresolver(pyutilib.component.core.SingletonPlugin):
    1616    """
    1717    This plugin changes variables names to use a simple name that
     
    1919    """
    2020
    21     pyutilib.plugin.core.implements(IPyomoPresolveAction)
     21    pyutilib.component.core.implements(IPyomoPresolveAction)
    2222
    2323    def __init__(self, **kwds):
    2424        kwds['name'] = "numeric_varlabels"
    25         pyutilib.plugin.core.Plugin.__init__(self, **kwds)
     25        pyutilib.component.core.Plugin.__init__(self, **kwds)
    2626
    2727    def rank(self):
  • coopr.pyomo/stable/2.2/coopr/pyomo/presolve/simple_presolver.py

    r2194 r2208  
    1010
    1111import pyutilib.misc
    12 import pyutilib.plugin.core
     12import pyutilib.component.core
    1313from coopr.pyomo.base import IPyomoPresolver, IPyomoPresolveAction
    1414
    1515
    16 class SimplePresolver(pyutilib.plugin.core.SingletonPlugin):
     16class SimplePresolver(pyutilib.component.core.SingletonPlugin):
    1717    """
    1818    This plugin simply applies presolve actions in a fixed order
     
    2020    """
    2121
    22     pyutilib.plugin.core.implements(IPyomoPresolver)
     22    pyutilib.component.core.implements(IPyomoPresolver)
    2323
    2424    def __init__(self, **kwds):
    2525        kwds['name'] = "simple_presolver"
    26         pyutilib.plugin.core.Plugin.__init__(self, **kwds)
    27         self.actions = pyutilib.plugin.core.ExtensionPoint(IPyomoPresolveAction)
     26        pyutilib.component.core.Plugin.__init__(self, **kwds)
     27        self.actions = pyutilib.component.core.ExtensionPoint(IPyomoPresolveAction)
    2828        self.active_actions = set()
    2929        self.action_rank = {}
  • coopr.pyomo/stable/2.2/coopr/pyomo/tests/expr/test_canonical.py

    r2194 r2208  
    1616import pyutilib.services
    1717from coopr.pyomo.presolve.simple_presolver import SimplePresolver
    18 from pyutilib.plugin.core import PluginGlobals
     18from pyutilib.component.core import PluginGlobals
    1919
    2020class frozendict(dict):
  • coopr.pyomo/stable/2.2/coopr/pyomo/tests/unit/test_transform.py

    r2002 r2208  
    1414import pyutilib.th
    1515import pyutilib.services
    16 from pyutilib.plugin.core import Plugin
     16from pyutilib.component.core import Plugin
    1717
    1818class Test(pyutilib.th.TestCase):
  • coopr.pyomo/stable/2.2/coopr/pyomo/transform/eliminate_fixed_vars.py

    r2108 r2208  
    88#  _________________________________________________________________________
    99
    10 import pyutilib.plugin.core
     10import pyutilib.component.core
    1111from coopr.pyomo.base import IModelTransformation
    1212from coopr.pyomo import Constraint, Objective, NumericConstant, Expression
     
    1515
    1616
    17 class EliminateFixedVars(pyutilib.plugin.core.SingletonPlugin):
     17class EliminateFixedVars(pyutilib.component.core.SingletonPlugin):
    1818    """
    1919    This plugin relaxes integrality in a Pyomo model.
    2020    """
    2121
    22     pyutilib.plugin.core.implements(IModelTransformation)
     22    pyutilib.component.core.implements(IModelTransformation)
    2323
    2424    def __init__(self, **kwds):
    2525        kwds['name'] = "eliminate_fixed_vars"
    26         pyutilib.plugin.core.Plugin.__init__(self, **kwds)
     26        pyutilib.component.core.Plugin.__init__(self, **kwds)
    2727
    2828    def apply(self, model, **kwds):
  • coopr.pyomo/stable/2.2/coopr/pyomo/transform/relax_integrality.py

    r2097 r2208  
    88#  _________________________________________________________________________
    99
    10 import pyutilib.plugin.core
     10import pyutilib.component.core
    1111from coopr.pyomo.base import IModelTransformation
    1212from coopr.pyomo.base import Var
     
    1414
    1515
    16 class RelaxIntegrality(pyutilib.plugin.core.SingletonPlugin):
     16class RelaxIntegrality(pyutilib.component.core.SingletonPlugin):
    1717    """
    1818    This plugin relaxes integrality in a Pyomo model.
    1919    """
    2020
    21     pyutilib.plugin.core.implements(IModelTransformation)
     21    pyutilib.component.core.implements(IModelTransformation)
    2222
    2323    def __init__(self, **kwds):
    2424        kwds['name'] = "relax_integrality"
    25         pyutilib.plugin.core.Plugin.__init__(self, **kwds)
     25        pyutilib.component.core.Plugin.__init__(self, **kwds)
    2626
    2727    def apply(self, model, **kwds):
  • coopr.pyomo/stable/2.2/examples/pyomo/p-median/solver1.py

    r2107 r2208  
    11# Imports from Coopr and PyUtilib
    22from coopr.pyomo import *
    3 from pyutilib.plugin.core import *
     3from pyutilib.component.core import *
    44from coopr.opt import *
    55
  • coopr.pyomo/stable/2.2/examples/pyomo/p-median/solver2.py

    r2107 r2208  
    11# Imports from Coopr and PyUtilib
    22from coopr.pyomo import *
    3 from pyutilib.plugin.core import *
     3from pyutilib.component.core import *
    44from coopr.opt import *
    55import random
Note: See TracChangeset for help on using the changeset viewer.