Changeset 2630
- Timestamp:
- May 21, 2010 10:47:57 AM (11 years ago)
- Location:
- coopr.pyomo/trunk/coopr/pyomo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
coopr.pyomo/trunk/coopr/pyomo/base/__init__.py
r2611 r2630 30 30 from util import * 31 31 from rangeset import * 32 33 # 34 # This is a hack to strip out modules, which shouldn't have been included in these imports 35 # 36 import types 37 _locals = locals() 38 __all__ = [__name for __name in _locals.keys() if (not __name.startswith('_') and not isinstance(_locals[__name],types.ModuleType)) or __name == '_' ] 39 __all__.append('pyomo') -
coopr.pyomo/trunk/coopr/pyomo/io/cpxlp.py
r2592 r2630 14 14 15 15 from coopr.opt import ProblemFormat 16 from coopr.pyomo.base import expr, Var, Constraint, Objective 16 from coopr.pyomo.base import expr, Var, Constraint, Objective, NumericConstant 17 17 from coopr.pyomo.base.var import _VarValue, _VarBase 18 18 from coopr.pyomo.base.param import _ParamValue … … 180 180 if not isinstance(base,expr._SumExpression): 181 181 raise ValueError, "Quadratic term base must be a _SumExpression" 182 if not isinstance(exponent, numvalue.NumericConstant):182 if not isinstance(exponent,NumericConstant): 183 183 raise ValueError, "Quadratic term exponent must be a NumericConstant" 184 184 variable = base._args[0] … … 208 208 print >>OUTPUT, " - " + str(objective_offset) + " ONE_VAR_CONSTANT" 209 209 210 elif isinstance(arg, numvalue.NumericConstant):210 elif isinstance(arg,NumericConstant): 211 211 # this is the "0.0" element that forms the initial expression - the 212 212 # quadratic sub-expressions aren't known to the presolve routines.
Note: See TracChangeset
for help on using the changeset viewer.